[关闭]
@XQF 2016-08-12T19:11:00.000000Z 字数 1794 阅读 840

《匿名》第七课----登陆界面设计

匿名


值得注意的一个标签

** android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"//子布局在父布局的位置
android:orientation="vertical"
android:paddingTop="20dp" > **

aty_login.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:gravity="center_horizontal"
  6. android:orientation="vertical"
  7. android:paddingTop="20dp" >
  8. <LinearLayout
  9. android:layout_width="wrap_content"
  10. android:layout_height="wrap_content"
  11. android:orientation="horizontal" >
  12. <TextView
  13. android:layout_width="wrap_content"
  14. android:layout_height="wrap_content"
  15. android:text="@string/phone"
  16. android:textAppearance="?android:attr/textAppearanceLarge" />
  17. <EditText
  18. android:id="@+id/etPhoneNum"
  19. android:layout_width="200dp"
  20. android:layout_height="wrap_content"
  21. android:inputType="phone"
  22. android:singleLine="true" />
  23. </LinearLayout>
  24. <Button
  25. android:id="@+id/btnGetCode"
  26. android:layout_width="wrap_content"
  27. android:layout_height="wrap_content"
  28. android:text="@string/get_code"
  29. android:textAppearance="?android:attr/textAppearanceLarge" />
  30. <LinearLayout
  31. android:layout_width="wrap_content"
  32. android:layout_height="wrap_content"
  33. android:orientation="horizontal" >
  34. <TextView
  35. android:layout_width="wrap_content"
  36. android:layout_height="wrap_content"
  37. android:text="@string/code"
  38. android:textAppearance="?android:attr/textAppearanceLarge" />
  39. <EditText
  40. android:id="@+id/etCode"
  41. android:layout_width="200dp"
  42. android:layout_height="wrap_content"
  43. android:inputType="number"
  44. android:singleLine="true" />
  45. </LinearLayout>
  46. <Button
  47. android:id="@+id/btnLogin"
  48. android:layout_width="wrap_content"
  49. android:layout_height="wrap_content"
  50. android:text="@string/login"
  51. android:textAppearance="?android:attr/textAppearanceLarge" />
  52. </LinearLayout>
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注