book_edit.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:focusableInTouchMode="true"
  8. android:orientation="vertical"
  9. tools:ignore="Autofill">
  10. <include layout="@layout/default_app_bar" />
  11. <ScrollView
  12. android:layout_width="match_parent"
  13. android:layout_height="match_parent">
  14. <androidx.constraintlayout.widget.ConstraintLayout
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content"
  17. android:animateLayoutChanges="true"
  18. android:focusableInTouchMode="true">
  19. <com.google.android.material.textfield.TextInputLayout
  20. android:id="@+id/book_title_input"
  21. style="@style/TextInputLayoutStyle"
  22. android:layout_width="0dp"
  23. android:layout_height="wrap_content"
  24. android:layout_marginTop="16dp"
  25. android:hint="@string/book.hint.title"
  26. app:layout_constraintLeft_toLeftOf="parent"
  27. app:layout_constraintRight_toLeftOf="@id/bookImage"
  28. app:layout_constraintTop_toTopOf="parent">
  29. <EditText
  30. android:id="@+id/titleEditText"
  31. android:layout_width="match_parent"
  32. android:layout_height="wrap_content"
  33. android:inputType="textCapSentences"
  34. tools:ignore="LabelFor"
  35. tools:text="Два капитана" />
  36. </com.google.android.material.textfield.TextInputLayout>
  37. <com.google.android.material.textfield.TextInputLayout
  38. android:id="@+id/book_author_input"
  39. style="@style/TextInputLayoutStyle"
  40. android:layout_width="0dp"
  41. android:layout_height="wrap_content"
  42. android:layout_marginTop="16dp"
  43. android:hint="@string/book.hint.author"
  44. app:layout_constraintLeft_toLeftOf="parent"
  45. app:layout_constraintRight_toLeftOf="@id/bookImage"
  46. app:layout_constraintTop_toBottomOf="@id/book_title_input">
  47. <EditText
  48. android:id="@+id/authorEditText"
  49. android:layout_width="match_parent"
  50. android:layout_height="wrap_content"
  51. android:inputType="textCapWords"
  52. tools:ignore="LabelFor"
  53. tools:text="Вениамин Каверин" />
  54. </com.google.android.material.textfield.TextInputLayout>
  55. <ImageView
  56. android:id="@+id/bookImage"
  57. android:layout_width="0dp"
  58. android:layout_height="0dp"
  59. android:layout_marginLeft="16dp"
  60. android:layout_marginRight="16dp"
  61. android:visibility="gone"
  62. app:layout_constraintBottom_toBottomOf="@id/book_author_input"
  63. app:layout_constraintDimensionRatio="3:4"
  64. app:layout_constraintRight_toRightOf="parent"
  65. app:layout_constraintTop_toTopOf="@id/book_title_input"
  66. tools:ignore="ContentDescription"
  67. tools:src="@drawable/rectangle_placeholder_background"
  68. tools:visibility="visible" />
  69. <TextView
  70. android:id="@+id/progressText"
  71. android:layout_width="match_parent"
  72. android:layout_height="wrap_content"
  73. android:layout_marginTop="16dp"
  74. android:gravity="center_horizontal"
  75. app:layout_constraintTop_toBottomOf="@id/book_author_input"
  76. tools:text="20%" />
  77. <androidx.appcompat.widget.AppCompatSeekBar
  78. android:id="@+id/progressSeekBar"
  79. android:layout_width="match_parent"
  80. android:layout_height="wrap_content"
  81. android:layout_marginTop="16dp"
  82. android:padding="16dp"
  83. android:progress="0"
  84. app:layout_constraintTop_toBottomOf="@id/book_author_input"
  85. tools:progress="20" />
  86. <com.google.android.material.textfield.TextInputLayout
  87. android:id="@+id/bookYearInput"
  88. style="@style/TextInputLayoutStyle"
  89. android:layout_width="0dp"
  90. android:layout_height="wrap_content"
  91. android:hint="@string/book.hint.year"
  92. app:layout_constraintHorizontal_chainStyle="spread_inside"
  93. app:layout_constraintLeft_toLeftOf="parent"
  94. app:layout_constraintRight_toLeftOf="@+id/bookMonthInput"
  95. app:layout_constraintTop_toBottomOf="@id/progressSeekBar">
  96. <EditText
  97. android:id="@+id/yearEditText"
  98. android:layout_width="match_parent"
  99. android:layout_height="wrap_content"
  100. android:inputType="number"
  101. tools:ignore="LabelFor"
  102. tools:text="2012" />
  103. </com.google.android.material.textfield.TextInputLayout>
  104. <com.google.android.material.textfield.TextInputLayout
  105. android:id="@+id/bookMonthInput"
  106. style="@style/TextInputLayoutStyle"
  107. android:layout_width="0dp"
  108. android:layout_height="wrap_content"
  109. android:hint="@string/book.hint.month"
  110. app:layout_constraintLeft_toRightOf="@id/bookYearInput"
  111. app:layout_constraintRight_toLeftOf="@+id/bookDayInput"
  112. app:layout_constraintTop_toBottomOf="@id/progressSeekBar">
  113. <EditText
  114. android:id="@+id/monthEditText"
  115. android:layout_width="match_parent"
  116. android:layout_height="wrap_content"
  117. android:inputType="number"
  118. tools:ignore="LabelFor" />
  119. </com.google.android.material.textfield.TextInputLayout>
  120. <com.google.android.material.textfield.TextInputLayout
  121. android:id="@+id/bookDayInput"
  122. style="@style/TextInputLayoutStyle"
  123. android:layout_width="0dp"
  124. android:layout_height="wrap_content"
  125. android:hint="@string/book.hint.day"
  126. app:layout_constraintLeft_toRightOf="@id/bookMonthInput"
  127. app:layout_constraintRight_toRightOf="parent"
  128. app:layout_constraintTop_toBottomOf="@id/progressSeekBar">
  129. <EditText
  130. android:id="@+id/dayEditText"
  131. android:layout_width="match_parent"
  132. android:layout_height="wrap_content"
  133. android:inputType="number"
  134. tools:ignore="LabelFor" />
  135. </com.google.android.material.textfield.TextInputLayout>
  136. <androidx.appcompat.widget.AppCompatEditText
  137. android:id="@+id/notesTextArea"
  138. android:layout_width="match_parent"
  139. android:layout_height="wrap_content"
  140. android:layout_margin="16dp"
  141. android:drawablePadding="16dp"
  142. android:hint="@string/book.hint.notes"
  143. android:inputType="textCapSentences|textMultiLine"
  144. android:minLines="2"
  145. android:padding="16dp"
  146. app:background="@drawable/text_area_background"
  147. app:layout_constraintBottom_toBottomOf="parent"
  148. app:layout_constraintTop_toBottomOf="@id/bookYearInput"
  149. tools:text="Неистово плюсую" />
  150. <androidx.constraintlayout.widget.Group
  151. android:id="@+id/bookDateInputGroup"
  152. android:layout_width="0dp"
  153. android:layout_height="0dp"
  154. android:visibility="gone"
  155. app:constraint_referenced_ids="bookYearInput,bookMonthInput,bookDayInput"
  156. tools:visibility="visible" />
  157. </androidx.constraintlayout.widget.ConstraintLayout>
  158. </ScrollView>
  159. </LinearLayout>