[Android]Tab
来源:互联网 发布:淘宝助手批量上传 编辑:程序博客网 时间:2024/06/06 16:25
<?xml version="1.0" encoding="utf-8"?><TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_alignParentBottom="true" 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="0.0dip" android:layout_weight="1.0" /> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0.0" android:visibility="gone"/> <RadioGroup android:id="@+id/radioGroup" android:layout_width="fill_parent" android:layout_height="60dp" android:layout_gravity="bottom" android:gravity="left" android:background="@drawable/bg_bottom_tab" android:orientation="horizontal" > <RadioButton android:id="@+id/homepage" style="@style/bottom_tab_style" android:drawableTop="@drawable/bg_tab_homepage" android:tag="HomePage" android:text="@string/HomePage" /> <RadioButton android:id="@+id/sell" style="@style/bottom_tab_style" android:drawableTop="@drawable/bg_tab_homepage" android:tag="Sell" android:text="@string/Sell" /> <RadioButton android:id="@+id/buy" style="@style/bottom_tab_style" android:drawableTop="@drawable/bg_tab_homepage" android:tag="Buy" android:text="@string/Buy" /> <RadioButton android:id="@+id/donate" style="@style/bottom_tab_style" android:drawableTop="@drawable/bg_tab_homepage" android:tag="Donate" android:text="@string/Donate" /> <RadioButton android:id="@+id/more" style="@style/bottom_tab_style" android:drawableTop="@drawable/bg_tab_homepage" android:tag="More" android:text="@string/More" /> </RadioGroup> </LinearLayout></TabHost>
styles.xml中配置
<style name="bottom_tab_style"> <item name="android:textSize">15.0dip</item> <item name="android:textColor">#ffffffff</item> <item name="android:gravity">center_horizontal</item> <item name="android:background">@drawable/selector_radiobutton</item> <item name="android:paddingTop">8.0dip</item> <item name="android:button">@null</item> <item name="android:layout_weight">1.0</item> <item name="android:drawablePadding">5.0dip</item>
selector_radiobutton.xml
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/bg_tab_radiobutton_s" android:state_enabled="true" android:state_focused="true" android:state_pressed="false"/> <item android:drawable="@drawable/bg_tab_radiobutton_d" android:state_enabled="true" android:state_pressed="true"/> <item android:drawable="@drawable/bg_tab_radiobutton_d" android:state_enabled="true" android:state_checked="true" /></selector>
1 0
- android Tab
- [Android]Tab
- Android-Tab
- (Android 基础知识) ActionBar.Tab---导航Tab(标签)
- android中的tab
- Android: 自定义Tab样式
- tab in android
- tab in android
- android tab和listiew
- Android: 自定义Tab样式
- Android: 自定义Tab样式
- Android 创建Tab
- Android dynamic TAB Control
- android tab的使用
- Android: 自定义Tab样式
- android tab使用
- android tab的实现
- android tab layout
- poj 2367 Genealogical tree(topsort)
- jsp中进行翻页跳转
- 大魔术师
- HTML5移动开发(9)——从一个多媒体标签说起
- ios UIScrollView 一些属性
- [Android]Tab
- Vtune 学习笔记 分析锁 Tutorial: Analyzing Locks and Waits
- 图像显著性论文(四)—Context-Aware Saliency Detection
- 图解classloader加载class的流程及自定义ClassLoader
- 1
- java反射
- 第8周项目4-个人所得税计算器
- nyist 509 因子和阶乘
- ios 百度推送获取不到deviceToken原因