家庭记账本Android登录界面

 MainActivity.java

   package com.example.logindemo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.logindemo_layout);
    }
}

logindemo_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@mipmap/background1">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="50dp"
        android:padding="30dp"
        android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_marginLeft="30dp"
        android:drawableLeft="@mipmap/ic_launcher_round"
        android:text="家庭记账本"
        android:textSize="40sp"
        android:layout_height="wrap_content"/>

        <EditText
            android:layout_width="match_parent"
            android:layout_marginTop="30dp"
            android:layout_height="wrap_content"
            android:hint="用户名" />
        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="密码" />
        <Button
            android:layout_width="match_parent"
            android:text="登录"
            android:textSize="20sp"
            android:layout_height="wrap_content"/>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp">


            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:text="没有账号,立即去注册"
                android:textColor="#00ffff"
                android:textSize="16sp" />
        </RelativeLayout>

    </LinearLayout>



</RelativeLayout>

猜你喜欢

转载自www.cnblogs.com/yeyueweiliang/p/12243977.html