Newer
Older
music / app / src / main / res / layout / fragment_edit_instrument.xml
  1. <?xml version="1.0" encoding="utf-8"?><!--
  2. ~ Copyright (C) 2022 Lukas Eisenhauer
  3. ~
  4. ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
  5. ~
  6. ~ This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  7. ~
  8. ~ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
  9. -->
  10.  
  11. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  12. xmlns:app="http://schemas.android.com/apk/res-auto"
  13. xmlns:tools="http://schemas.android.com/tools"
  14. android:layout_width="match_parent"
  15. android:layout_height="match_parent"
  16. tools:context=".EditInstrumentFragment">
  17.  
  18. <com.google.android.material.floatingactionbutton.FloatingActionButton
  19. android:id="@+id/editEffectsButton"
  20. android:layout_width="wrap_content"
  21. android:layout_height="wrap_content"
  22. android:layout_marginTop="32dp"
  23. android:clickable="true"
  24. android:contentDescription="@string/edit_voice"
  25. android:src="@android:drawable/ic_menu_edit"
  26. app:fabSize="mini"
  27. app:layout_constraintEnd_toEndOf="parent"
  28. app:layout_constraintHorizontal_bias="0.512"
  29. app:layout_constraintStart_toStartOf="parent"
  30. app:layout_constraintTop_toBottomOf="@+id/editEnvelopeButton" />
  31.  
  32. <TextView
  33. android:id="@+id/textView11"
  34. android:layout_width="wrap_content"
  35. android:layout_height="wrap_content"
  36. android:text="@string/edit_envelope"
  37. app:layout_constraintBottom_toBottomOf="@+id/editEnvelopeButton"
  38. app:layout_constraintEnd_toStartOf="@+id/editEnvelopeButton"
  39. app:layout_constraintStart_toStartOf="@+id/textView7"
  40. app:layout_constraintTop_toTopOf="@+id/editEnvelopeButton" />
  41.  
  42. <TextView
  43. android:id="@+id/textView"
  44. android:layout_width="wrap_content"
  45. android:layout_height="0dp"
  46. android:layout_marginStart="16dp"
  47. android:layout_marginTop="16dp"
  48. android:layout_marginEnd="16dp"
  49. android:text="@string/edit_instrument"
  50. android:textSize="20sp"
  51. app:layout_constraintEnd_toEndOf="parent"
  52. app:layout_constraintStart_toStartOf="parent"
  53. app:layout_constraintTop_toTopOf="parent" />
  54.  
  55. <TextView
  56. android:id="@+id/textView2"
  57. android:layout_width="wrap_content"
  58. android:layout_height="0dp"
  59. android:layout_marginStart="16dp"
  60. android:layout_marginTop="40dp"
  61. android:labelFor="@id/instrumentNameTextBox"
  62. android:text="@string/instrument_name"
  63. app:layout_constraintStart_toStartOf="parent"
  64. app:layout_constraintTop_toBottomOf="@+id/textView" />
  65.  
  66. <EditText
  67. android:id="@+id/instrumentNameTextBox"
  68. android:layout_width="0dp"
  69. android:layout_height="wrap_content"
  70. android:layout_marginStart="16dp"
  71. android:layout_marginEnd="16dp"
  72. android:ems="10"
  73. android:importantForAutofill="no"
  74. android:inputType="textPersonName"
  75. android:minHeight="48dp"
  76. android:text="@string/placeholder"
  77. app:layout_constraintBottom_toBottomOf="@+id/textView2"
  78. app:layout_constraintEnd_toEndOf="parent"
  79. app:layout_constraintStart_toEndOf="@+id/textView2"
  80. app:layout_constraintTop_toTopOf="@+id/textView2"
  81. tools:ignore="DuplicateSpeakableTextCheck" />
  82.  
  83. <com.google.android.material.floatingactionbutton.FloatingActionButton
  84. android:id="@+id/close_button"
  85. android:layout_width="wrap_content"
  86. android:layout_height="wrap_content"
  87. android:layout_marginTop="32dp"
  88. android:layout_marginBottom="16dp"
  89. android:clickable="true"
  90. android:contentDescription="@string/close"
  91. android:src="@android:drawable/ic_menu_close_clear_cancel"
  92. app:layout_constraintBottom_toBottomOf="parent"
  93. app:layout_constraintEnd_toEndOf="parent"
  94. app:layout_constraintStart_toStartOf="parent"
  95. app:layout_constraintTop_toBottomOf="@+id/editEffectsButton" />
  96.  
  97. <Spinner
  98. android:id="@+id/waveformSelection"
  99. android:layout_width="0dp"
  100. android:layout_height="wrap_content"
  101. android:layout_marginStart="16dp"
  102. android:layout_marginTop="32dp"
  103. android:contentDescription="@string/waveform"
  104. android:minHeight="48dp"
  105. app:layout_constraintEnd_toEndOf="@+id/instrumentNameTextBox"
  106. app:layout_constraintStart_toEndOf="@+id/textView3"
  107. app:layout_constraintTop_toBottomOf="@+id/instrumentNameTextBox"
  108. tools:ignore="DuplicateSpeakableTextCheck" />
  109.  
  110. <Spinner
  111. android:id="@+id/voiceSelection"
  112. android:layout_width="0dp"
  113. android:layout_height="wrap_content"
  114. android:layout_marginStart="16dp"
  115. android:layout_marginTop="32dp"
  116. android:layout_marginEnd="16dp"
  117. android:contentDescription="@string/waveform"
  118. android:minHeight="48dp"
  119. app:layout_constraintEnd_toStartOf="@+id/editVoiceButton"
  120. app:layout_constraintStart_toEndOf="@+id/textView7"
  121. app:layout_constraintTop_toBottomOf="@+id/volumeSeek"
  122. tools:ignore="DuplicateSpeakableTextCheck" />
  123.  
  124. <TextView
  125. android:id="@+id/textView7"
  126. android:layout_width="wrap_content"
  127. android:layout_height="wrap_content"
  128. android:text="@string/voice"
  129. app:layout_constraintBottom_toBottomOf="@+id/voiceSelection"
  130. app:layout_constraintStart_toStartOf="@+id/textView2"
  131. app:layout_constraintTop_toTopOf="@+id/voiceSelection" />
  132.  
  133. <TextView
  134. android:id="@+id/textView3"
  135. android:layout_width="wrap_content"
  136. android:layout_height="wrap_content"
  137. android:text="@string/waveform"
  138. app:layout_constraintBottom_toBottomOf="@+id/waveformSelection"
  139. app:layout_constraintStart_toStartOf="@+id/textView2"
  140. app:layout_constraintTop_toTopOf="@+id/waveformSelection" />
  141.  
  142. <SeekBar
  143. android:id="@+id/volumeSeek"
  144. android:layout_width="0dp"
  145. android:layout_height="wrap_content"
  146. android:layout_marginTop="16dp"
  147. app:layout_constraintEnd_toEndOf="@+id/waveformSelection"
  148. app:layout_constraintHorizontal_bias="0.0"
  149. app:layout_constraintStart_toStartOf="@+id/textView7"
  150. app:layout_constraintTop_toBottomOf="@+id/volumeText" />
  151.  
  152. <TextView
  153. android:id="@+id/volumeText"
  154. android:layout_width="wrap_content"
  155. android:layout_height="wrap_content"
  156. android:layout_marginTop="32dp"
  157. android:text="@string/placeholder"
  158. app:layout_constraintEnd_toEndOf="@+id/waveformSelection"
  159. app:layout_constraintStart_toStartOf="@+id/textView7"
  160. app:layout_constraintTop_toBottomOf="@+id/waveformSelection" />
  161.  
  162. <com.google.android.material.floatingactionbutton.FloatingActionButton
  163. android:id="@+id/editVoiceButton"
  164. android:layout_width="wrap_content"
  165. android:layout_height="wrap_content"
  166. android:clickable="true"
  167. android:contentDescription="@string/edit_voice"
  168. android:src="@android:drawable/ic_menu_edit"
  169. app:fabSize="mini"
  170. app:layout_constraintBottom_toBottomOf="@+id/voiceSelection"
  171. app:layout_constraintEnd_toEndOf="@+id/instrumentNameTextBox"
  172. app:layout_constraintTop_toTopOf="@+id/voiceSelection" />
  173.  
  174. <com.google.android.material.floatingactionbutton.FloatingActionButton
  175. android:id="@+id/editEnvelopeButton"
  176. android:layout_width="wrap_content"
  177. android:layout_height="wrap_content"
  178. android:layout_marginTop="32dp"
  179. android:clickable="true"
  180. android:contentDescription="@string/edit_voice"
  181. android:src="@android:drawable/ic_menu_edit"
  182. app:fabSize="mini"
  183. app:layout_constraintEnd_toEndOf="parent"
  184. app:layout_constraintStart_toStartOf="parent"
  185. app:layout_constraintTop_toBottomOf="@+id/voiceSelection" />
  186.  
  187. <TextView
  188. android:id="@+id/textView9"
  189. android:layout_width="wrap_content"
  190. android:layout_height="wrap_content"
  191. android:text="@string/edit_effects"
  192. app:layout_constraintBottom_toBottomOf="@+id/editEffectsButton"
  193. app:layout_constraintEnd_toStartOf="@+id/editEffectsButton"
  194. app:layout_constraintStart_toStartOf="@+id/textView7"
  195. app:layout_constraintTop_toTopOf="@+id/editEffectsButton" />
  196.  
  197. </androidx.constraintlayout.widget.ConstraintLayout>