<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>
android相对布局实例—登录界面_第1张图片

更多相关文章

  1. 关于"match_parent"这个xml的布局设定值
  2. 引入布局
  3. Android中RelativeLayout布局各个xml相对布局属性的介绍和使用
  4. Android之TableLayout布局
  5. Android 布局之DrawLayout
  6. 应用界面主题Theme使用方法
  7. Android学习笔记_布局文件属性的说明
  8. (4.1.25)android学习之布局
  9. 布局初步

随机推荐

  1. 图文列表和课程表
  2. 表单、内联框架及css练习
  3. html中做图片,链接,列表,图文列表 及一个
  4. 注册页面和后台
  5. 图片、链接、列表及表格标签的学习与运用
  6. 登录表单、后台架构、样式来源与优先级
  7. 图片/链接/列表/表格-简单写法
  8. 简单的后台框架
  9. HTML标签的使用
  10. 表单+简单后台架构+元素样式来源与优先级