Я использовал учебник tabhost, чтобы начать работу с элементом управления Tabhost.
После некоторой тренировки я захотел сделать прокрутку с Tabhost, которую я понял.
Теперь я хочу, чтобы в нижней части дисплея был ярлык, который у меня просто не работает.
Переключено на Относительную компоновку, которая была предложена здесь: Вкладка в стиле iPhone
Мой код:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:scrollbars="horizontal" android:isScrollContainer="true">
<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" android:layout_alignParentBottom="true">
<RelativeLayout android:layout_height="fill_parent"
android:layout_width="fill_parent">
<HorizontalScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:scrollbars="none"
android:layout_alignParentBottom="true">
<TabWidget android:id="@android:id/tabs"
android:layout_alignParentBottom="true" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</HorizontalScrollView>
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:padding="2dp" />
</RelativeLayout>
</TabHost>
Мне нужен намек, почему он не работает / как это будет работать. Я попробовал с относительным расположением и layout_alignParentBottom="true"
, теперь он там несколько раз (в HorizontalScrollView и TabWidget)