我想在Android上制作Tab标签控件。
但是选项卡控件显示在顶部,其中我希望它显示在底行
有人可以帮忙吗
最佳答案
布局中的tabwidget对象是将包含选项卡的视图。
您可以将其移动到屏幕上的任何位置。
这是有关如何使用RelativeLayout将其移至屏幕底部的示例
<?xml version="1.0" encoding="utf-8"?>
<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">
...
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</RelativeLayout>