以下android:layout_weight 是什么意思?
我有这个:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<Button
android:id="@+id/buttonToastSimple"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="English Toast" />
<Button
android:id="@+id/buttonToastFancy"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="French Toast" />
</LinearLayout>
该链接告诉我 buttonToastFancy 将占据四分之三的大小 (3/(3+1),但反过来说。根据 Eclipse/我的 AVD,buttonToastSimple 占据了四分之三的屏幕大小。
我究竟做错了什么?