User-friendly input interface and user-friendly Input Interface
Demo2 \ youhao \ src \ main \ res \ layout \ activity_main.xml
1 <TableLayout xmlns: android = "http://schemas.android.com/apk/res/android" 2 xmlns: tools = "http://schemas.android.com/tools" 3 android: layout_width = "match_parent" 4 android: layout_height = "match_parent" 5 android: stretchColumns = "1" 6 tools: context = ". mainActivity "> 7 8 <TableRow> 9 10 <TextView11 android: layout_width =" match_parent "12 android: layout_height =" wrap_content "13 android: text =" username "14 android: textSize = "16dp"/> 15 16 <EditText17 android: layout_width = "match_parent" 18 android: layout_height = "wrap_content" 19 android: hint = "please fill in the login account" 20 android: selectAllOnFocus = "true"/> 21 </TableRow> 22 23 <TableRow> 24 25 <TextView26 android: layout_width = "match_parent" 27 android: layout_height = "wrap_content" 28 android: text = "password" 29 android: textSize = "16dp"/> 30 31 <EditText32 android: layout_width = "match_parent" 33 android: layout_height = "wrap_content" 34 android: hint = "Enter the logon password" 35 android: inputType = "numberPassword"/> 36 </TableRow> 37 38 <TableRow> 39 40 <TextView41 android: layout_width = "match_parent" 42 android: layout_height = "wrap_content" 43 android: text = "Age" 44 android: textSize = "16dp"/> 45 46 <EditText47 android: layout_width = "match_parent" 48 android: layout_height = "wrap_content" 49 android: hint = "Please enter the age" 50 android: inputType = "number"/> 51 </TableRow> 52 53 <TableRow> 54 55 <TextView56 android: layout_width = "match_parent" 57 android: layout_height = "wrap_content" 58 android: text = "Birthday" 59 android: textSize = "16dp"/> 60 61 <EditText62 android: layout_width = "match_parent" 63 android: layout_height = "wrap_content" 64 android: hint = "please fill in the birthday" 65 android: inputType = "date"/> 66 </TableRow> 67 68 <TableRow> 69 70 <TextView71 android: layout_width = "match_parent" 72 android: layout_height = "wrap_content" 73 android: text = "phone number" 74 android: textSize = "16dp"/> 75 76 <EditText77 android: layout_width = "match_parent" 78 android: layout_height = "wrap_content" 79 android: hint = "Enter the phone number" 80 android: inputType = "phone" 81 android: selectAllOnFocus = "true"/> 82 </TableRow> 83 84 <Button85 android: layout_width = "wrap_content" 86 android: layout_height = "wrap_content" 87 android: text = "register 88"/> 89 </TableLayout>