LinearLayout(线性布局):
:layout/activity_main.xml
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_height="wrap_content"
android:text="用户名:"/>
android:layout_height="wrap_content"
android:hint="请输入1-10个字符"
android:layout_weight="1"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_height="wrap_content"
android:text="密 码:"/>
android:layout_height="wrap_content"
android:hint="请输入1-10个字符"
android:layout_weight="1"
android:password="true"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp">
android:layout_height="30dp"
android:layout_weight="1"
/>
效果:
- 【Android】使用代码动态创建布局
- Android Studio 自带的侧滑布局设置
- android UI布局练习3
- android怎样在布局文件监听事假
- 【Android UI】Android开发之View的几种布局方式及实践
- Android系统移植(三)-按键字符表
- Android 开发:(四)Android五大布局及属性详解
- Android读书笔记之Android布局小结
- android输入法弹出调整布局与沉浸式状态栏冲突+fitSystemWindows
随机推荐
-
Android ADT, SDK, SDK_tool等官方下载说
-
【转】android 图片自动切换
-
[置顶] Android学习之lowmemorykiller dr
-
Binder框架 -- android AIDL 的使用
-
Android logcat log size -- Android log
-
Android 之 GrideView网格视图
-
android windowSoftInputMode
-
android view 局部刷新
-
Android 无闪烁启动画面程序源码
-
Android 可编辑下拉选择框