Android四種佈局方式
阿新 • • 發佈:2018-10-31
線性佈局
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/button" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="7" android:text="Button" android:textAllCaps="false" /> <ProgressBar android:id="@+id/process_bar" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:max="100" /> </LinearLayout>