zoukankan      html  css  js  c++  java
  • 第一次冲刺(五)

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

    布局文件为:

    <?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>
  • 相关阅读:
    WPF/MVVM 快速开始指南(译)
    Rose2003的安装和破解
    自定义vs代码段
    silverlight中Grid.ColumnDefinitions属性设置错误
    vs绑定和取消绑定项目和解决方案
    firefox浏览器中silverlight无法输入问题
    silverlight中当前上下文中不存在名称“InitializeComponent“错误
    inotify使用代码
    build android toochain on mac (gcc 4.4.3 compile)
    istat 一个不错的widget
  • 原文地址:https://www.cnblogs.com/20193925zxt/p/14910564.html
Copyright © 2011-2022 走看看