现在做一个TAB分页式菜单,我想改善一下布局,把tab放到下方,不知道有哪位同学做过?类似于这个效果:
http://www.sisou.cn/read-htm-tid-451.html

解决方案 »

  1.   

    他用的不是TAB控件吧,好像是4个button来切换主界面吧,
      

  2.   

    不知道他用的是不是button;
    我要做的是tab,但不知道怎么让它在下方显示。
      

  3.   

    我觉得应该要修改Framework层的东西可以实现这个功能。
      

  4.   

    我看过了那个的确不是用Tab这个空间做的它就是利用简单的TextView集成Button控件来完成的
      

  5.   


    Framework层的东西怎么改啊 ,请问?
      

  6.   

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

  7.   

    他们用的是menu 我做过实例
      

  8.   


    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>
      

  9.   

    用的是ActivityGroup + GridView 实现Tab分页标签吧 参考下http://blog.csdn.net/hellogv/archive/2010/12/06/6057174.aspx