Android碰到的问题之一
16lz
2021-01-23
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="身高 (cm)" /> <EditText android:id="@+id/height" android:layout_width="fill_parent" android:layout_height="wrap_content" android:numeric="integer" android:text="" /></LinearLayout>当屏幕是垂直分布的时候,要使用LinearLayout,和android:orientation="vertical"布局方式是线性垂直布局,而不用RelativeLayout相对垂直布局,
更多相关文章
- 关于LinearLayout布局中,子控件平分宽度
- Android Layout布局文件里的android:layout_height等属性为什么
- android RelativeLayout属性和布局实例
- Android界面编程——Android布局组件(二)
- 关于界面布局的一些小知识
- Android 第七课——UI布局
- android布局文件属性说明(转)