2011-02-09 4 views

答えて

1
<?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:orientation="vertical" 
    android:layout_width="fill_parent" android:layout_height="fill_parent"> 
    <RadioGroup android:layout_width="fill_parent" 
     android:layout_height="wrap_content" android:orientation="horizontal" 
     android:checkedButton="@+id/first" android:id="@+id/states"> 
     <RadioButton android:id="@+id/first" android:background="@drawable/button_radio" 
     android:width="80dip" android:height="70dip" /> 
     <RadioButton android:id="@+id/second" android:background="@drawable/button_radio" 
     android:width="80dip" android:height="70dip" /> 
     <RadioButton android:id="@+id/third" android:background="@drawable/button_radio" 
     android:width="80dip" android:height="70dip" /> 
     <RadioButton android:id="@+id/fourth" android:background="@drawable/button_radio" 
     android:width="80dip" android:height="70dip" /> 
    </RadioGroup> 
    <FrameLayout android:id="@android:id/tabcontent" 
     android:layout_width="fill_parent" android:layout_height="0dip" 
     android:layout_weight="1" android:padding="20dip" android:background="#fff"/> 
    <TabWidget android:id="@android:id/tabs" 
     android:layout_width="fill_parent" android:layout_height="wrap_content" 
     android:layout_weight="0" android:visibility="gone" /> 
    </LinearLayout> 
</TabHost> 

わずか2コメント:

  • iPhoneタブ吸います...いや、申し訳ありませんが、私は意味:iPhoneのタブは吸います。実際、タブは吸う。
  • このようなことを試みる前に、UIの基本についてお読みください。ご覧のとおり、LinearLayoutsの子の順番を変更するだけでした。
+1

なぜあなたはすべてのタブが吸うと言っているようですか?あなたは精緻化できますか?私はこのアプローチのようにではなく、単にAndroidで提供されているTabHostとTabWidgetを使用して、私のアプリでタブを使っています。私はiPhoneのタブの外観も気に入っていて、UIの流れを助けるならば、私は個人的にタブがあると思う。 –

関連する問題