android中的标签布局默认的事把标签放在上方,
从网上看到可以让标签放在屏幕的底部,但是不知道怎么把标签放在屏幕的左边或者右边
有经验的分享一下啊
从网上看到可以让标签放在屏幕的底部,但是不知道怎么把标签放在屏幕的左边或者右边
有经验的分享一下啊
解决方案 »
- 局域网内两台主机,一台(A)通过USB连接android设备,另一台(B)怎么用adb连接android设备?
- 图片的放大缩小
- 安装android SDK2.0及创建2.0模拟器的方法
- 恭喜那些能安装安卓开发环境的同学
- Android SDK Manager的问题
- 进度条图片刷新问题
- 疯狂QA拿着尺子量布局间距,怎么办?
- error: do_inode_allocate_extents: Failed to allocate 749 blocks
- 求助资料~~~
- activity的状态保存和恢复问题(急~~)
- Android ListView中元素添加弹出Dialog确认框
- 如何在机顶盒上进行android应用的开发?
左边和右边不知道能不能实现
其实你可以选择其他的控件来替代 tabhost并不是很好
tab多的时候看起来就很难看
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:layout_weight="0"
android:paddingTop="3dip"
android:background="#69DADA" />
-->
</LinearLayout>
</TabHost>因此,如果你想布置标签在坐标的,代码如下:
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:layout_weight="1" />
<TabWidget
android:id="@android:id/tabs"
android:layout_height="fill_parent"
android:layout_width="50dip"
android:layout_weight="0"
android:paddingTop="3dip"
android:background="#69DADA" />
-->
</LinearLayout>
</TabHost>好了,标签在左侧的布局就是这样的,相信在右侧的你也学会了!