2013-07-21 28 views
0

我跟着一个教程,我得到了我想要的标签,但他们在屏幕的底部。Android Tabs自下而上

这里是我的main.xml:

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

     <TabWidget 
      android:id="@android:id/tabs" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_weight="0" /> 
    </LinearLayout> 

</TabHost> 

的哪些错误?由于

+1

尽量把TabWidget中的FrameLayout – talkol

+0

这么多的启发式算法之前,这样一个简单的答案。多谢,伙计。作品像一个魅力 –

+0

为其后代添加了一个答案:) – talkol

回答

0

尽量把的FrameLayout前TabWidget在XML

+0

嘿talkol。 http://stackoverflow.com/questions/17777168/android-is-it-possible-to-create-both-bottom-and-top-tabs-on-the-screen你能帮我解决这个问题吗?没有人给我一个直接的答案,它对我来说很紧迫。谢谢 –