安卓UI四种基本布局-线性布局
16lz
2021-01-26
1》线性布局(LinerLayout)
所有的空间在线性上依次排序
android:orientation="vertical"(纵向布局)
android:orientation="horizontal"(横向布局)
即使控件在这一行放不下也不会跳转到下一行
layout_weight可以更好地安排空间的大小和分布比例
<EditText
android:id="@+id/e1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="type something"
/>
<Button
android:id="@+id/b1"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="send"/>
转载于:https://www.cnblogs.com/837634902why/p/10306942.html
更多相关文章
- Android(安卓)自定义dialog
- 常用布局及基本 UI 控件(2)
- Android学习笔记---Layout的一些理解
- android 布局的相对性
- android LayoutInflater实例化的方法
- 类似于android短信校验码的demo
- Android(安卓)图片的读取与写入
- Android(安卓)Layout之一:FrameLayout
- Android(安卓)五大布局