2012-11-07 36 views
0

無論如何都存在改變左右文本空間?看看附加的屏幕。這麼多空間都浪費了。他們能適應不換行Android TabWidget文本空間

問候

Screen

<TabHost android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:id="@+id/tabHost" 
android:gravity="bottom" 
xmlns:android="http://schemas.android.com/apk/res/android">  
<TabWidget 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@android:id/tabs" /> 
<FrameLayout 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:id="@android:id/tabcontent" 
android:paddingTop="60px"> 
<!-- First tab --> 
<LinearLayout 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@+id/tabStations" 
android:orientation="vertical">  
</LinearLayout> 
<!-- Second Tab --> 
<LinearLayout 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:id="@+id/tabSuggestions" 
android:orientation="vertical"> 
</LinearLayout> 
</FrameLayout> 
</TabHost> 

回答

0

我猜測,因爲我看不到你的XML佈局代碼,但我懷疑你沒有Android版本:在它layout_width =「FILL_PARENT」 。如果你這樣做,然後張貼你的XML,我會思考。

+0

我編輯了第一篇文章,並添加了XML代碼。我想我到處都是「fill_parent」。你在屏幕截圖上看到的是tabwidget充滿了我的屏幕的全部寬度 - 這沒問題。問題是每個標籤在有很多空間時都不適合文字 – Dibo