2013-01-19 38 views

回答

0

嘗試使用機器人:定義你的孩子瀏覽時layout_weight。

對於圖1使用的0.8和視圖使用一個佈局0.2重量

示例XML的佈局重量將是:

android:layout_weight=".8" 
0

像這樣:

不要忘記寬度設置爲0。

<TextView 
    android:layout_width="0dp" 
    android:layout_height="match_parent" 
    android:layout_weight=".8" 
    android:background="@color/blue" /> 

<TextView 
    android:layout_width="0dp" 
    android:layout_height="match_parent" 
    android:layout_weight=".2" 
    android:background="@color/red" /> 

相關問題