首页 > 系统 > Android > 正文

android 选项卡(TabHost)如何放置在屏幕的底部

2019-10-24 21:08:13
字体:
来源:转载
供稿:网友
如何将TAB放置在屏幕的底端,有很多的新手都想实现这种效果,本文搜集整理了一些,感兴趣的朋友可以参考下哦
 
今天写Tab的时候由于TAB的跳转问题去查资料,倒反而发现更有趣的问题,就是如何将TAB放置在屏幕的底端。 
复制代码代码如下:

<?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> 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表