Android开发23-10-18

· · 个人记录

<?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:orientation="vertical"
    android:clickable="true"
    tools:context=".MainActivity">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="50dp"
        android:orientation="vertical">
        <TextView
            android:id="@+id/textv1"
            android:layout_width="match_parent"
            android:layout_height="35dp"
            android:text="用户名"/>
        <EditText
            android:id="@+id/name"
            android:layout_width="match_parent"
            android:layout_height="55dp"
            android:ems="20"
            android:inputType="textPersonName"
            android:text=""/>
        <TextView
            android:id="@+id/textv2"
            android:layout_width="match_parent"
            android:layout_height="35dp"
            android:text="密码"/>
        <EditText
            android:id="@+id/psd"
            android:layout_width="match_parent"
            android:layout_height="55dp"
            android:ems="20"
            android:inputType="textPassword"
            android:text=""/>
        <Button
            android:id="@+id/login_btn"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:text="登录"/>
    </LinearLayout>
</LinearLayout>