Android简单布局------QQ登陆

来源:互联网 发布:淘宝封号支付宝能用吗 编辑:程序博客网 时间:2024/05/17 21:56
        

<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="15dp"
    tools:context=".MainActivity"
    >

    <TextView
        android:id="@+id/textview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:text="登陆界面"
        android:textSize="30sp" />

    <EditText
        android:id="@+id/edit1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_below="@id/textview"
        android:hint="请输入姓名" />

    <EditText
        android:id="@+id/edit2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@id/edit1"
        android:layout_alignRight="@id/edit1"
        android:layout_below="@id/edit1"
        android:hint="请输入密码"
        android:password="true" />

    <Button
        android:id="@+id/bt1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@id/edit2"
        android:text="注册" />

    <Button
        android:id="@+id/bt2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@id/bt1"
        android:layout_toLeftOf="@id/bt1"
        android:text="登陆" />


</RelativeLayout>

0 0
原创粉丝点击