我想添加水平LinearLayout
編程的第一個孩子寬度,確保老二的LinearLayout - 使基於第二
通吃的寬度需要與第一個孩子將剩下的全部空間。
我沒有要添加的代碼,因爲我嘗試了很多選項,而且還沒有任何工作。
有什麼想法嗎?
我想添加水平LinearLayout
編程的第一個孩子寬度,確保老二的LinearLayout - 使基於第二
通吃的寬度需要與第一個孩子將剩下的全部空間。
我沒有要添加的代碼,因爲我嘗試了很多選項,而且還沒有任何工作。
有什麼想法嗎?
嘗試這種變化的BUTTON3
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:weightSum="1.0" >
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Back" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Read sad s as d" />
</LinearLayout>
給予第二個孩子的揮舞1給第一個孩子分配什麼分量 –
?以及放在LayoutParams上的內容? – piojo