मेरे पास निम्न XML है। मैं अपने स्क्रॉलव्यू के नीचे एक स्थिर बटन बनाने की कोशिश कर रहा हूं। मैंने वजन निर्धारित करने की कोशिश की है, बटन को स्क्रॉलव्यू के नीचे सेट करें, आदि। क्या कोई मुझे एक रास्ता दे सकता है कि मैं बटन को नीचे रहने के लिए प्राप्त कर सकता हूं और स्क्रॉलव्यू केवल स्क्रीन के बीच में ले जाता है?स्क्रॉलव्यू के तहत एक स्थिर बटन कैसे बनाएं?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/menuButtons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/newItems"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Items" />
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/categories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Categories" />
</LinearLayout>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/contentScroller"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/menuButtons">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="1" >
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip" >
<ImageView
android:src="@drawable/thumbdrive"/>"
<TextView
android:layout_column="1"
android:text="Thumb Drives"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<ImageView
android:src="@drawable/laptop"/>
<TextView
android:layout_column="1"
android:text="Laptops"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<ImageView
android:src="@drawable/sdcard"/>
<TextView
android:layout_column="1"
android:text="SD Cards"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
</TableLayout>
</LinearLayout>
</ScrollView>
<Button
android:id="@+id/submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="Submit New Item"
android:layout_below="@id/contentScroller"/>
</RelativeLayout>
मैंने कल ठीक उसी मुद्दे को हल किया लेकिन मुझे एक और चाल मिली, बस जिज्ञासा से, क्या आप मुझे बता सकते हैं कि लैंडस्केप मोड में दृश्य कैसा है? धन्यवाद – tuandroid
परिदृश्य में ठीक लग रहा है। – kieblera5