首页 > 编程语言 >打卡程序登录界面

打卡程序登录界面

时间:2023-03-01 22:47:53浏览次数:39  
标签:程序 打卡 界面 代码 登录

代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/background"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="60dp"
        android:layout_marginTop="20dp"
        android:layout_gravity="center">


        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/welcome"
            android:textSize="28sp"
            android:textColor="#000000"></TextView>

    </LinearLayout>
     
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:layout_marginTop="200dp"
        android:layout_marginStart="50dp"
        android:layout_marginEnd="50dp">

        <TextView
            android:id="@+id/text_1"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:text="@string/username"
            android:textSize="30sp"
            android:textColor="#000000"
            android:textStyle="bold">
        </TextView>

        <EditText
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_toEndOf="@+id/text_1">

        </EditText>

    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:layout_marginStart="50dp"
        android:layout_marginEnd="50dp">

        <TextView
            android:id="@+id/text_2"
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:text="@string/userpassword"
            android:textSize="30sp"
            android:textColor="#000000"
            android:textStyle="bold">
        </TextView>

        <EditText
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_toEndOf="@+id/text_2">

        </EditText>

    </RelativeLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center">
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/login"
            tools:ignore="ButtonStyle">
        </Button>

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/register"
            tools:ignore="ButtonStyle">
        </Button>
    </LinearLayout>

</LinearLayout>

登录界面:

标签:程序,打卡,界面,代码,登录
From: https://www.cnblogs.com/ysk0904/p/17170180.html

相关文章