10.13

  1 <?xml version="1.0" encoding="utf-8"?>
  2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 android:layout_width="match_parent"
  4 android:layout_height="match_parent">
  5  
  6 <ImageView
  7     android:layout_width="wrap_content"
  8     android:layout_height="wrap_content"
  9     android:background="@mipmap/ic_launcher"
 10     android:layout_marginTop="150dp"
 11     android:layout_centerHorizontal="true"/>
 12  
 13 <EditText
 14     android:layout_width="200dp"
 15     android:layout_height="wrap_content"
 16     android:text="请输入用户名:"
 17     android:layout_marginTop="250dp"
 18     android:layout_centerHorizontal="true"/>
 19  
 20 <EditText
 21     android:layout_width="200dp"
 22     android:layout_height="wrap_content"
 23     android:text="请输入用户名:"
 24     android:layout_marginTop="300dp"
 25     android:layout_centerHorizontal="true"/>
 26 <Button
 27     android:layout_width="100dp"
 28     android:layout_height="50dp"
 29     android:layout_centerHorizontal="true"
 30     android:layout_marginTop="350dp"
 31     android:text="登录"
 32     android:onClick="click"/>
 33 </RelativeLayout>
 34  
 35 <?xml version="1.0" encoding="utf-8"?>
 36 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 37 xmlns:app="http://schemas.android.com/apk/res-auto"
 38 xmlns:tools="http://schemas.android.com/tools"
 39 android:layout_width="match_parent"
 40 android:layout_height="match_parent"
 41 android:background="#F5F4F4"
 42 android:orientation="vertical"
 43 tools:context=".MainActivity">
 44  
 45 <TextView
 46 android:id="@+id/textView"
 47 android:layout_width="match_parent"
 48 android:layout_height="40dp"
 49 android:background="#00BCD4"
 50 android:enabled="true"
 51 android:gravity="center"
 52 android:text="注册界面"
 53 android:textColor="#FF5722"
 54 android:textSize="30sp" />
 55  
 56 <TableLayout
 57 android:layout_width="match_parent"
 58 android:layout_height="200dp"
 59 android:gravity="center">
 60  
 61 <TableRow
 62 android:layout_width="match_parent"
 63 android:layout_height="match_parent"
 64 android:gravity="center">
 65  
 66 <TextView
 67 android:id="@+id/name"
 68 android:layout_width="wrap_content"
 69 android:layout_height="30dp"
 70 android:enabled="true"
 71 android:text="用户名:"
 72 android:textSize="20sp"
 73 android:textStyle="bold" />
 74  
 75 <EditText
 76 android:id="@+id/etname"
 77 android:layout_width="wrap_content"
 78 android:layout_height="wrap_content"
 79 android:ems="10"
 80 android:inputType="textPersonName" />
 81 </TableRow>
 82  
 83 <TableRow
 84 android:layout_width="match_parent"
 85 android:layout_height="match_parent"
 86 android:gravity="center">
 87  
 88 <TextView
 89 android:id="@+id/password"
 90 android:layout_width="wrap_content"
 91 android:layout_height="30dp"
 92 android:enabled="true"
 93 android:text="密码:"
 94 android:textSize="20sp"
 95 android:textStyle="bold" />
 96  
 97 <EditText
 98 android:id="@+id/etpass"
 99 android:layout_width="wrap_content"
100 android:layout_height="wrap_content"
101 android:ems="10"
102 android:inputType="numberPassword" />
103  
104 </TableRow>
105 </TableLayout>

 

posted @ 2020-12-20 16:58  刘显栋  阅读(31)  评论(0编辑  收藏  举报