activity_register.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:fitsSystemWindows="true">
  7. <android.support.design.widget.AppBarLayout
  8. android:id="@+id/appBarLayout"
  9. android:layout_width="match_parent"
  10. android:layout_height="240dp"
  11. android:fitsSystemWindows="true"
  12. android:theme="@style/AppTheme.AppBarOverlay">
  13. <android.support.design.widget.CollapsingToolbarLayout
  14. android:id="@+id/toolbarLayout"
  15. android:layout_width="match_parent"
  16. android:layout_height="match_parent"
  17. android:fitsSystemWindows="true"
  18. app:contentScrim="?attr/colorPrimary"
  19. app:layout_scrollFlags="scroll|exitUntilCollapsed">
  20. <ImageView
  21. android:layout_width="match_parent"
  22. android:layout_height="match_parent"
  23. android:layout_margin="48dp"
  24. android:fitsSystemWindows="true"
  25. android:scaleType="fitCenter"
  26. android:src="@drawable/ic_launcher_white_128"
  27. app:layout_collapseMode="parallax" />
  28. <android.support.v7.widget.Toolbar
  29. android:id="@+id/toolbar"
  30. android:layout_width="match_parent"
  31. android:layout_height="?attr/actionBarSize"
  32. app:layout_collapseMode="pin" />
  33. </android.support.design.widget.CollapsingToolbarLayout>
  34. </android.support.design.widget.AppBarLayout>
  35. <android.support.v4.widget.NestedScrollView
  36. android:layout_width="match_parent"
  37. android:layout_height="match_parent"
  38. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  39. <RelativeLayout
  40. android:layout_width="match_parent"
  41. android:layout_height="wrap_content">
  42. <android.support.v7.widget.CardView
  43. android:id="@+id/cardView"
  44. android:layout_width="match_parent"
  45. android:layout_height="match_parent"
  46. android:layout_margin="24dp"
  47. app:cardBackgroundColor="@color/white"
  48. app:cardCornerRadius="5dp"
  49. app:cardPreventCornerOverlap="true"
  50. app:cardUseCompatPadding="true">
  51. <RelativeLayout
  52. android:layout_width="match_parent"
  53. android:layout_height="match_parent"
  54. android:padding="24dp">
  55. <android.support.design.widget.TextInputLayout
  56. android:id="@+id/usernameLayout"
  57. android:layout_width="match_parent"
  58. android:layout_height="wrap_content">
  59. <cn.minbb.evaluation.views.ClearTextInputEditText
  60. android:id="@+id/username"
  61. android:layout_width="match_parent"
  62. android:layout_height="match_parent"
  63. android:drawableLeft="@drawable/ic_action_person_dark"
  64. android:hint="用户名" />
  65. </android.support.design.widget.TextInputLayout>
  66. <android.support.design.widget.TextInputLayout
  67. android:id="@+id/passwordLayout"
  68. android:layout_width="match_parent"
  69. android:layout_height="wrap_content"
  70. android:layout_below="@id/usernameLayout">
  71. <cn.minbb.evaluation.views.ClearTextInputEditText
  72. android:id="@+id/password"
  73. android:layout_width="match_parent"
  74. android:layout_height="match_parent"
  75. android:layout_below="@id/usernameLayout"
  76. android:drawableLeft="@drawable/ic_action_lock_dark"
  77. android:hint="密码"
  78. android:inputType="textPassword" />
  79. </android.support.design.widget.TextInputLayout>
  80. <android.support.design.widget.TextInputLayout
  81. android:id="@+id/repeatPasswordLayout"
  82. android:layout_width="match_parent"
  83. android:layout_height="wrap_content"
  84. android:layout_below="@id/passwordLayout">
  85. <cn.minbb.evaluation.views.ClearTextInputEditText
  86. android:id="@+id/repeatPassword"
  87. android:layout_width="match_parent"
  88. android:layout_height="match_parent"
  89. android:layout_below="@id/usernameLayout"
  90. android:drawableLeft="@drawable/ic_action_lock_dark"
  91. android:hint="重复密码"
  92. android:inputType="textPassword" />
  93. </android.support.design.widget.TextInputLayout>
  94. <CheckBox
  95. android:id="@+id/alreadyRead"
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:layout_below="@id/repeatPasswordLayout"
  99. android:layout_marginTop="20dp"
  100. android:checked="false"
  101. android:text="我已阅读" />
  102. <TextView
  103. android:id="@+id/userInstructions"
  104. android:layout_width="wrap_content"
  105. android:layout_height="wrap_content"
  106. android:layout_alignBaseline="@+id/alreadyRead"
  107. android:layout_toRightOf="@id/alreadyRead"
  108. android:background="@color/text_gray_background_selector"
  109. android:text="《用户须知》"
  110. android:textColor="@android:color/holo_blue_dark" />
  111. </RelativeLayout>
  112. </android.support.v7.widget.CardView>
  113. <android.support.design.widget.FloatingActionButton
  114. android:id="@+id/register"
  115. android:layout_width="wrap_content"
  116. android:layout_height="wrap_content"
  117. android:layout_alignBaseline="@id/cardView"
  118. android:layout_alignBottom="@id/cardView"
  119. android:layout_alignParentRight="true"
  120. android:layout_marginBottom="36dp"
  121. android:layout_marginRight="6dp"
  122. android:rotation="180"
  123. app:srcCompat="@drawable/ic_arrow_back_white_24dp" />
  124. </RelativeLayout>
  125. </android.support.v4.widget.NestedScrollView>
  126. </android.support.design.widget.CoordinatorLayout>