Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
10 KiB

6 years ago
6 years ago
6 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout 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. <ScrollView xmlns:app="http://schemas.android.com/apk/res-auto"
  7. android:layout_width="match_parent"
  8. android:layout_height="0dp"
  9. app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
  10. app:layout_constraintStart_toStartOf="parent"
  11. app:layout_constraintTop_toTopOf="parent">
  12. <androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content">
  15. <Spinner
  16. android:id="@+id/spFrom"
  17. android:layout_width="0dp"
  18. android:layout_height="wrap_content"
  19. android:layout_marginTop="6dp"
  20. app:layout_constraintEnd_toStartOf="@+id/ivIdentityAdd"
  21. app:layout_constraintStart_toStartOf="parent"
  22. app:layout_constraintTop_toTopOf="parent" />
  23. <ImageView
  24. android:id="@+id/ivIdentityAdd"
  25. android:layout_width="24dp"
  26. android:layout_height="24dp"
  27. android:layout_marginStart="6dp"
  28. android:layout_marginEnd="6dp"
  29. android:src="@drawable/baseline_person_add_24"
  30. app:layout_constraintBottom_toBottomOf="@id/spFrom"
  31. app:layout_constraintEnd_toEndOf="parent"
  32. app:layout_constraintTop_toTopOf="@id/spFrom" />
  33. <MultiAutoCompleteTextView
  34. android:id="@+id/etTo"
  35. android:layout_width="0dp"
  36. android:layout_height="wrap_content"
  37. android:layout_marginStart="6dp"
  38. android:hint="@string/title_to"
  39. android:inputType="textEmailAddress|textMultiLine"
  40. android:singleLine="true"
  41. android:textAppearance="@style/TextAppearance.AppCompat.Medium"
  42. app:layout_constraintEnd_toStartOf="@+id/ivToAdd"
  43. app:layout_constraintStart_toStartOf="parent"
  44. app:layout_constraintTop_toBottomOf="@+id/spFrom" />
  45. <ImageView
  46. android:id="@+id/ivToAdd"
  47. android:layout_width="24dp"
  48. android:layout_height="24dp"
  49. android:layout_marginStart="6dp"
  50. android:layout_marginEnd="6dp"
  51. android:src="@drawable/baseline_person_24"
  52. app:layout_constraintBottom_toBottomOf="@id/etTo"
  53. app:layout_constraintEnd_toEndOf="parent"
  54. app:layout_constraintStart_toEndOf="@id/etTo"
  55. app:layout_constraintTop_toTopOf="@+id/etTo" />
  56. <MultiAutoCompleteTextView
  57. android:id="@+id/etCc"
  58. android:layout_width="0dp"
  59. android:layout_height="wrap_content"
  60. android:layout_marginStart="6dp"
  61. android:hint="@string/title_cc"
  62. android:inputType="textEmailAddress|textMultiLine"
  63. android:singleLine="true"
  64. android:textAppearance="@style/TextAppearance.AppCompat.Medium"
  65. app:layout_constraintEnd_toStartOf="@+id/ivCcAdd"
  66. app:layout_constraintStart_toStartOf="parent"
  67. app:layout_constraintTop_toBottomOf="@+id/etTo" />
  68. <ImageView
  69. android:id="@+id/ivCcAdd"
  70. android:layout_width="24dp"
  71. android:layout_height="24dp"
  72. android:layout_marginStart="6dp"
  73. android:layout_marginEnd="6dp"
  74. android:src="@drawable/baseline_person_24"
  75. app:layout_constraintBottom_toBottomOf="@id/etCc"
  76. app:layout_constraintEnd_toEndOf="parent"
  77. app:layout_constraintStart_toEndOf="@id/etCc"
  78. app:layout_constraintTop_toTopOf="@+id/etCc" />
  79. <MultiAutoCompleteTextView
  80. android:id="@+id/etBcc"
  81. android:layout_width="0dp"
  82. android:layout_height="wrap_content"
  83. android:layout_marginStart="6dp"
  84. android:hint="@string/title_bcc"
  85. android:inputType="textEmailAddress|textMultiLine"
  86. android:singleLine="true"
  87. android:textAppearance="@style/TextAppearance.AppCompat.Medium"
  88. app:layout_constraintEnd_toStartOf="@+id/ivBccAdd"
  89. app:layout_constraintStart_toStartOf="parent"
  90. app:layout_constraintTop_toBottomOf="@+id/etCc" />
  91. <ImageView
  92. android:id="@+id/ivBccAdd"
  93. android:layout_width="24dp"
  94. android:layout_height="24dp"
  95. android:layout_marginStart="6dp"
  96. android:layout_marginEnd="6dp"
  97. android:src="@drawable/baseline_person_24"
  98. app:layout_constraintBottom_toBottomOf="@id/etBcc"
  99. app:layout_constraintEnd_toEndOf="parent"
  100. app:layout_constraintStart_toEndOf="@id/etBcc"
  101. app:layout_constraintTop_toTopOf="@+id/etBcc" />
  102. <EditText
  103. android:id="@+id/etSubject"
  104. android:layout_width="0dp"
  105. android:layout_height="wrap_content"
  106. android:layout_marginStart="6dp"
  107. android:layout_marginEnd="6dp"
  108. android:hint="@string/title_subject"
  109. android:inputType="textEmailSubject|textCapSentences|textMultiLine"
  110. android:singleLine="true"
  111. android:textAppearance="@style/TextAppearance.AppCompat.Medium"
  112. app:layout_constraintEnd_toEndOf="parent"
  113. app:layout_constraintStart_toStartOf="parent"
  114. app:layout_constraintTop_toBottomOf="@+id/etBcc" />
  115. <View
  116. android:id="@+id/vSeparatorAttachments"
  117. android:layout_width="match_parent"
  118. android:layout_height="1dp"
  119. android:layout_marginTop="3dp"
  120. android:background="?attr/colorSeparator"
  121. app:layout_constraintStart_toStartOf="parent"
  122. app:layout_constraintTop_toBottomOf="@id/etSubject" />
  123. <androidx.recyclerview.widget.RecyclerView
  124. android:id="@+id/rvAttachment"
  125. android:layout_width="0dp"
  126. android:layout_height="wrap_content"
  127. android:layout_marginStart="6dp"
  128. android:layout_marginTop="3dp"
  129. android:layout_marginEnd="6dp"
  130. app:layout_constraintEnd_toEndOf="parent"
  131. app:layout_constraintStart_toStartOf="parent"
  132. app:layout_constraintTop_toBottomOf="@+id/vSeparatorAttachments" />
  133. <View
  134. android:id="@+id/vSeparator"
  135. android:layout_width="match_parent"
  136. android:layout_height="1dp"
  137. android:layout_marginTop="6dp"
  138. android:background="?attr/colorSeparator"
  139. app:layout_constraintStart_toStartOf="parent"
  140. app:layout_constraintTop_toBottomOf="@+id/rvAttachment" />
  141. <EditText
  142. android:id="@+id/etBody"
  143. android:layout_width="match_parent"
  144. android:layout_height="wrap_content"
  145. android:layout_marginStart="6dp"
  146. android:layout_marginEnd="6dp"
  147. android:background="@null"
  148. android:fontFamily="monospace"
  149. android:gravity="top"
  150. android:hint="@string/title_body_hint"
  151. android:inputType="textCapSentences|textMultiLine"
  152. android:minHeight="480dp"
  153. android:textAppearance="@style/TextAppearance.AppCompat.Small"
  154. app:layout_constraintStart_toStartOf="parent"
  155. app:layout_constraintTop_toBottomOf="@id/vSeparator" />
  156. <androidx.constraintlayout.widget.Group
  157. android:id="@+id/grpHeader"
  158. android:layout_width="0dp"
  159. android:layout_height="0dp"
  160. app:constraint_referenced_ids="spFrom,ivIdentityAdd,etTo,ivToAdd,etSubject,vSeparator" />
  161. <androidx.constraintlayout.widget.Group
  162. android:id="@+id/grpAddresses"
  163. android:layout_width="0dp"
  164. android:layout_height="0dp"
  165. app:constraint_referenced_ids="etCc,ivCcAdd,etBcc,ivBccAdd" />
  166. <androidx.constraintlayout.widget.Group
  167. android:id="@+id/grpAttachments"
  168. android:layout_width="0dp"
  169. android:layout_height="0dp"
  170. app:constraint_referenced_ids="vSeparatorAttachments,rvAttachment" />
  171. </androidx.constraintlayout.widget.ConstraintLayout>
  172. </ScrollView>
  173. <com.google.android.material.bottomnavigation.BottomNavigationView
  174. android:id="@+id/bottom_navigation"
  175. android:layout_width="match_parent"
  176. android:layout_height="wrap_content"
  177. android:background="@color/colorPrimary"
  178. app:itemIconTint="@color/bottomnav_background"
  179. app:itemTextColor="@color/bottomnav_background"
  180. app:labelVisibilityMode="labeled"
  181. app:layout_constraintBottom_toBottomOf="parent"
  182. app:layout_constraintEnd_toEndOf="parent"
  183. app:layout_constraintStart_toStartOf="parent"
  184. app:menu="@menu/action_compose" />
  185. <ProgressBar
  186. android:id="@+id/pbWait"
  187. style="@style/Base.Widget.AppCompat.ProgressBar"
  188. android:layout_width="wrap_content"
  189. android:layout_height="wrap_content"
  190. android:indeterminate="true"
  191. app:layout_constraintBottom_toBottomOf="parent"
  192. app:layout_constraintEnd_toEndOf="parent"
  193. app:layout_constraintStart_toStartOf="parent"
  194. app:layout_constraintTop_toTopOf="parent" />
  195. </androidx.constraintlayout.widget.ConstraintLayout>