现在做一个TAB分页式菜单,我想改善一下布局,把tab放到下方,不知道有哪位同学做过?类似于这个效果:
http://www.sisou.cn/read-htm-tid-451.html
http://www.sisou.cn/read-htm-tid-451.html
解决方案 »
- 在2.x系统下正常的系统裁剪图片程序,在4.0下发生诡异错误!
- 求助,怎么跳转到某一个指定的动态壁纸预览界面
- Android Ormlite 复合主键
- android 获取GSM模式或wcdma模式
- 谁知道这个界面怎么去实现?
- android平台上,是否可以连接远程sqlserver2008
- android通过代理10.0.0.172,连接wap问题 期待高人解答 在线等。PS:人品好才是真的好,结帖率100%
- android hello world报错
- 关于android sdk更新到4.4.2后
- 急求解决BitmapFactory.decodeStream(is)返回null的问题
- 他们的结算率到底咋样啊!
- 求解:不规则图片响应点击事件问题
我要做的是tab,但不知道怎么让它在下方显示。
Framework层的东西怎么改啊 ,请问?
<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:orientation="vertical"
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"
/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/textview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="this is a tab" />
<TextView
android:id="@+id/textview2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="this is another tab" />
<TextView
android:id="@+id/textview3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="this is a third tab" />
</FrameLayout>
</RelativeLayout>
</TabHost>
menu?不能直接显示,那需要点击menu键才会出现的吧?
而且menu一排不能显示多于三个;不过我有用button实现的:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"> <TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@+id/mPath_1"
android:padding="5px" android:textSize="18sp" android:textColor="@drawable/white" /> <ListView android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0" /> <LinearLayout style="@android:style/ButtonBar"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="@+id/button_library_1" android:text="@string/menu1"
android:layout_width="0dip" android:layout_height="wrap_content"
android:layout_weight="1" />
<Button android:id="@+id/button_picture_1" android:text="@string/menu2"
android:layout_width="0dip" android:layout_height="wrap_content"
android:layout_weight="1" />
<Button android:id="@+id/button_audio_1" android:text="@string/menu3"
android:layout_width="0dip" android:layout_height="wrap_content"
android:layout_weight="1" />
<Button android:id="@+id/button_notes_1" android:text="@string/menu4"
android:layout_width="0dip" android:layout_height="wrap_content"
android:layout_weight="1" />
<Button android:id="@+id/button_settings_1" android:text="@string/menu5"
android:layout_width="0dip" android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>