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(安卓)Studio计算器 app
- Android(安卓)TextView 一些字体颜色、大小设置属性
- Android(安卓): upload Image using MultiPartEntityBuilder
- android完全退出程序的方法
- Android如何防止异常奔溃以及拿到crash日志,处理线上问题定位
- 自定义 Toast
- Android完全(退出)关闭应用程序
- Android中AppWidget使用方法
- android之无返回结果跳转intent
随机推荐
-
Show images from temp directory to end
-
PHP中的嵌套(多个)字符串插值
-
ThinkPHP连接主从数据库
-
PHP中的Xdebug会返回什么?
-
在Windows上安装最新的Apache 2.4.12遇到
-
使用Sublime Text 3的PHP 100%CPU使用率
-
如何使用spl_autoload_register?
-
centos6.5下使用yum完美搭建LNMP环境(php
-
使用javascript将文件输入到php文件
-
如何使用Amazon S3创建一次性下载链接?