android相对布局实例—登录界面
16lz
2021-01-23
<RelativeLayout 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:layout_margin="20dp" tools:context=".MainActivity" > <TextView android:id="@+id/Txttitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:gravity="center_horizontal" android:layout_alignParentRight="true" android:text="登录界面"/> <EditText android:id="@+id/username" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@id/Txttitle" android:layout_alignRight="@id/Txttitle" android:layout_below="@id/Txttitle" android:layout_marginTop="20dp" android:hint="username"/> <EditText android:id="@+id/password" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/username" android:layout_alignLeft="@id/username" android:layout_alignRight="@id/username" android:layout_marginTop="20dp" android:hint="password" android:inputType="textCapWords"/></RelativeLayout>
更多相关文章
- 关于"match_parent"这个xml的布局设定值
- 引入布局
- Android中RelativeLayout布局各个xml相对布局属性的介绍和使用
- Android之TableLayout布局
- Android 布局之DrawLayout
- 应用界面主题Theme使用方法
- Android学习笔记_布局文件属性的说明
- (4.1.25)android学习之布局
- 布局初步