Вопрос Отредактировано:Как добавить несколько кнопок в нижней части экрана в ListActivity
Я добавил кнопки в нижней части экрана теперь моя ListView перекрываются кнопками, несмотря на ввод вида прокрутки. Как я могу ограничить просмотр прокрутки до кнопки. Ниже экрана и код
Код отредактирован в соответствии с предложением
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
<View
android:id="@+id/separator"
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_below="@android:id/tabs" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/btnSend"
android:layout_below="@+id/separator" >
<!-- Scrollview for message data -->
<ScrollView
android:id="@+id/formTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical" >
<LinearLayout
android:id="@+id/formLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<View
android:layout_width="fill_parent"
android:layout_height="5dip" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tabcontent"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/add_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_weight="1"
android:text="Home" />
<Button
android:id="@+id/back_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_weight="1"
android:text="Messages" />
<Button
android:id="@+id/back_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_weight="1"
android:text="History" />
<Button
android:id="@+id/back_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_weight="1"
android:text="Settings" />
<Button
android:id="@+id/back_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_weight="1"
android:text="Support" />
</LinearLayout>
</RelativeLayout>
</TabHost>
Добавить кнопки в виде нижнего колонтитула – Raghunandan
положить код кнопки в линейном макете, установить свойство alignparentbottom на этот макет линии. теперь просто добавьте столько кнопок, которые вы хотите в линейном макете. –
Я пробовал это. Но делая это, список, который находится в framelayout, прокручивается над кнопкой. – user45678