How do I place android TAB of TabHost at the bottom of the screen

  • 2020-05-07 20:26:25
  • OfStack

Today, when I wrote Tab, I looked up the information due to TAB's jump problem. Instead, I found a more interesting problem, which was how to place TAB at the bottom of the screen.
 
<?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" > 
<LinearLayout 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:orientation="vertical" > 
<FrameLayout 
android:id="@android:id/tabcontent" 
android:layout_width="fill_parent" 
android:layout_height="0dip" 
android:layout_weight="1" 
android:padding="5dp" /> 
<TabWidget 
android:id="@android:id/tabs" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
/> 
</LinearLayout> 
</TabHost> 

Related articles: