继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

安卓登录框界面xml文件

慕运维2858188
关注TA
已关注
手记 123
粉丝 63
获赞 512

图片描述

仿超文本链接

设置背影色为空 @null

设置颜色为 #2999ce

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
    android:orientation="vertical">

    <!--头部内容-->
    <RelativeLayout
        android:id="@+id/login_header"
        android:layout_width="match_parent"
        android:layout_height="120dp"
        android:background="#008cc9">

        <ImageView
            android:layout_alignParentRight="true"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_margin="16dp"
            android:src="@mipmap/login_close"/>

        <TextView
            android:layout_alignParentBottom="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="30sp"
            android:padding="16dp"
            android:textColor="#fff"
            android:text="@string/login"/>
    </RelativeLayout>

    <!--输入框-->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="16dp"
        >

       <EditText
           android:id="@+id/et_username"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:layout_marginBottom="16dp"
           android:hint="@string/input_your_name"/>
        />
        <EditText
            android:layout_below="@id/et_username"
            android:id="@+id/et_password"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/input_your_password"/>
        />

    </RelativeLayout>

    <!--密码功能-->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="16dp">

        <Button
            android:id="@+id/login"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/person_login"
            android:background="#d4d4d4"/>

        <Button
            android:id="@+id/btn_forget_pwd"
            android:layout_below="@id/login"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@null"
            android:textColor="#2999ce"
            android:gravity="start"
            android:layout_marginTop="16dp"
            android:textSize="16dp"
            android:text="@string/forget_password"/>

        <Button
            android:id="@+id/btn_register"
            android:layout_below="@id/login"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@null"
            android:textColor="#2999ce"
            android:gravity="end"
            android:text="@string/register"
            android:layout_marginTop="16dp"
            android:textSize="16dp"
            android:layout_alignParentRight="true"/>

    </RelativeLayout>

</LinearLayout>
打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP