• 第一次冲刺(五)


    今天我完成了用户界面的布局。

    布局文件为:

    <?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"
        tools:context=".MainActivity"
        android:orientation="vertical"
        android:background="@drawable/login">
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="50dp"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="5dp"
            android:orientation="vertical">
    
            <TextView
                android:id="@+id/textViewAppName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_marginTop="50dp"
                android:textColor="#F44336"
                android:textStyle="bold"
                android:textSize="60sp"
                android:typeface="serif"
                android:text="入住通" />
    
            <TextView
                android:id="@+id/textViewLoginId"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="50dp"
                android:layout_marginLeft="10dp"
                android:text="用户id" />
    
            <EditText
                android:id="@+id/editTextLoginId"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:background="@drawable/corners"
                android:ems="10"
                android:inputType="textPersonName"
                android:text="" />
    
            <TextView
                android:id="@+id/textViewLoginPassword"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginTop="20dp"
                android:text="密码" />
    
            <EditText
                android:id="@+id/editTextLoginPassword"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:background="@drawable/corners"
                android:ems="10"
                android:inputType="textPassword" />
    
    <!--        <com.google.android.material.checkbox.MaterialCheckBox-->
    <!--            android:id="@+id/remember"-->
    <!--            android:layout_width="100dp"-->
    <!--            android:layout_height="30dp"-->
    <!--            android:layout_marginLeft="10dp"-->
    <!--            android:layout_marginTop="20dp"-->
    <!--            android:text="记住密码">-->
    <!--        </com.google.android.material.checkbox.MaterialCheckBox>-->
    
    <!--        <com.google.android.material.checkbox.MaterialCheckBox-->
    <!--            android:id="@+id/autologin"-->
    <!--            android:layout_width="100dp"-->
    <!--            android:layout_height="30dp"-->
    <!--            android:layout_marginLeft="10dp"-->
    <!--            android:layout_marginTop="20dp"-->
    <!--            android:text="自动登录">-->
    <!--        </com.google.android.material.checkbox.MaterialCheckBox>-->
    
            <Spinner
                android:id="@+id/Spinner"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dp"
                android:entries="@array/ctype"
                android:layout_gravity="center_horizontal"/>
    
            <Button
                android:id="@+id/buttonLogin"
                android:layout_width="100dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="40dp"
                android:background="@drawable/btnpress"
                android:text="登录" />
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="20dp"
            android:layout_marginRight="5dp"
            android:orientation="horizontal">
    
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="" />
            <TextView
                android:id="@+id/textViewNoPassword"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#2196f3"
                android:layout_marginRight="10dp"
                android:text="忘记密码" />
    
            <TextView
                android:id="@+id/textViewRegister"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#2196f3"
                android:text="注册用户" />
        </LinearLayout>
    
    </LinearLayout>
  • 相关阅读:
    4-MSP430定时器_定时器中断
    关于STM32的外部引脚中断的问题
    关于stm32的正交解码
    红外接收控制灯亮灭
    mack pro常用快捷键
    liunx操作系统安装<一>
    支付宝架构师:从工程师到架构师的成长之路
    maven之setting.xml的配置详解
    分布式之《保证分布式系统数据一致性的6种解决方案》
    Eclipse中jsp、js文件编辑时,卡死现象解决汇总
  • 原文地址:https://www.cnblogs.com/20193925zxt/p/14910564.html
Copyright © 2020-2023  润新知