diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0076403..3d886c4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,6 +12,7 @@
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0076403..3d886c4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,6 +12,7 @@
+
diff --git a/app/src/main/java/com/lukas/music/EditVoiceFragment.kt b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
new file mode 100644
index 0000000..c121d46
--- /dev/null
+++ b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 Lukas Eisenhauer
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License along with this program. If not, see .
+ */
+
+package com.lukas.music
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.DialogFragment
+import com.lukas.music.databinding.FragmentEditVoiceBinding
+import com.lukas.music.song.voice.Voice
+
+class EditVoiceFragment(val voice: Voice) : DialogFragment() {
+ private lateinit var binding: FragmentEditVoiceBinding
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ binding = FragmentEditVoiceBinding.inflate(inflater)
+ binding.closeButton.setOnClickListener {
+ dismiss()
+ }
+ return binding.root
+ }
+
+ override fun onStart() {
+ super.onStart()
+ dialog?.window?.setLayout(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT
+ )
+ }
+}
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0076403..3d886c4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,6 +12,7 @@
+
diff --git a/app/src/main/java/com/lukas/music/EditVoiceFragment.kt b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
new file mode 100644
index 0000000..c121d46
--- /dev/null
+++ b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 Lukas Eisenhauer
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License along with this program. If not, see .
+ */
+
+package com.lukas.music
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.DialogFragment
+import com.lukas.music.databinding.FragmentEditVoiceBinding
+import com.lukas.music.song.voice.Voice
+
+class EditVoiceFragment(val voice: Voice) : DialogFragment() {
+ private lateinit var binding: FragmentEditVoiceBinding
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ binding = FragmentEditVoiceBinding.inflate(inflater)
+ binding.closeButton.setOnClickListener {
+ dismiss()
+ }
+ return binding.root
+ }
+
+ override fun onStart() {
+ super.onStart()
+ dialog?.window?.setLayout(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
index cca8ddd..605906a 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
@@ -17,6 +17,7 @@
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
+import com.lukas.music.EditVoiceFragment
import com.lukas.music.databinding.FragmentEditInstrumentBinding
import com.lukas.music.instruments.Instrument
import com.lukas.music.instruments.Waveform
@@ -58,6 +59,9 @@
) {
instrument.voice = Voice.DEFAULT_VOICES[it].constructors.first().call(instrument)
}
+ binding.editVoiceButton.setOnClickListener {
+ EditVoiceFragment(instrument.voice).showNow(childFragmentManager, "")
+ }
binding.closeButton.setOnClickListener {
dismiss()
}
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0076403..3d886c4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,6 +12,7 @@
+
diff --git a/app/src/main/java/com/lukas/music/EditVoiceFragment.kt b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
new file mode 100644
index 0000000..c121d46
--- /dev/null
+++ b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 Lukas Eisenhauer
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License along with this program. If not, see .
+ */
+
+package com.lukas.music
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.DialogFragment
+import com.lukas.music.databinding.FragmentEditVoiceBinding
+import com.lukas.music.song.voice.Voice
+
+class EditVoiceFragment(val voice: Voice) : DialogFragment() {
+ private lateinit var binding: FragmentEditVoiceBinding
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ binding = FragmentEditVoiceBinding.inflate(inflater)
+ binding.closeButton.setOnClickListener {
+ dismiss()
+ }
+ return binding.root
+ }
+
+ override fun onStart() {
+ super.onStart()
+ dialog?.window?.setLayout(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
index cca8ddd..605906a 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
@@ -17,6 +17,7 @@
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
+import com.lukas.music.EditVoiceFragment
import com.lukas.music.databinding.FragmentEditInstrumentBinding
import com.lukas.music.instruments.Instrument
import com.lukas.music.instruments.Waveform
@@ -58,6 +59,9 @@
) {
instrument.voice = Voice.DEFAULT_VOICES[it].constructors.first().call(instrument)
}
+ binding.editVoiceButton.setOnClickListener {
+ EditVoiceFragment(instrument.voice).showNow(childFragmentManager, "")
+ }
binding.closeButton.setOnClickListener {
dismiss()
}
diff --git a/app/src/main/res/layout/fragment_edit_instrument.xml b/app/src/main/res/layout/fragment_edit_instrument.xml
index 2d5cf09..b5578fc 100644
--- a/app/src/main/res/layout/fragment_edit_instrument.xml
+++ b/app/src/main/res/layout/fragment_edit_instrument.xml
@@ -90,9 +90,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
+ android:layout_marginEnd="16dp"
android:contentDescription="@string/waveform"
android:minHeight="48dp"
- app:layout_constraintEnd_toEndOf="@+id/instrumentNameTextBox"
+ app:layout_constraintEnd_toStartOf="@+id/editVoiceButton"
app:layout_constraintStart_toEndOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/volumeSeek"
tools:ignore="DuplicateSpeakableTextCheck" />
@@ -135,4 +136,16 @@
app:layout_constraintStart_toStartOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/waveformSelection" />
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0076403..3d886c4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,6 +12,7 @@
+
diff --git a/app/src/main/java/com/lukas/music/EditVoiceFragment.kt b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
new file mode 100644
index 0000000..c121d46
--- /dev/null
+++ b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 Lukas Eisenhauer
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License along with this program. If not, see .
+ */
+
+package com.lukas.music
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.DialogFragment
+import com.lukas.music.databinding.FragmentEditVoiceBinding
+import com.lukas.music.song.voice.Voice
+
+class EditVoiceFragment(val voice: Voice) : DialogFragment() {
+ private lateinit var binding: FragmentEditVoiceBinding
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ binding = FragmentEditVoiceBinding.inflate(inflater)
+ binding.closeButton.setOnClickListener {
+ dismiss()
+ }
+ return binding.root
+ }
+
+ override fun onStart() {
+ super.onStart()
+ dialog?.window?.setLayout(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
index cca8ddd..605906a 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
@@ -17,6 +17,7 @@
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
+import com.lukas.music.EditVoiceFragment
import com.lukas.music.databinding.FragmentEditInstrumentBinding
import com.lukas.music.instruments.Instrument
import com.lukas.music.instruments.Waveform
@@ -58,6 +59,9 @@
) {
instrument.voice = Voice.DEFAULT_VOICES[it].constructors.first().call(instrument)
}
+ binding.editVoiceButton.setOnClickListener {
+ EditVoiceFragment(instrument.voice).showNow(childFragmentManager, "")
+ }
binding.closeButton.setOnClickListener {
dismiss()
}
diff --git a/app/src/main/res/layout/fragment_edit_instrument.xml b/app/src/main/res/layout/fragment_edit_instrument.xml
index 2d5cf09..b5578fc 100644
--- a/app/src/main/res/layout/fragment_edit_instrument.xml
+++ b/app/src/main/res/layout/fragment_edit_instrument.xml
@@ -90,9 +90,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
+ android:layout_marginEnd="16dp"
android:contentDescription="@string/waveform"
android:minHeight="48dp"
- app:layout_constraintEnd_toEndOf="@+id/instrumentNameTextBox"
+ app:layout_constraintEnd_toStartOf="@+id/editVoiceButton"
app:layout_constraintStart_toEndOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/volumeSeek"
tools:ignore="DuplicateSpeakableTextCheck" />
@@ -135,4 +136,16 @@
app:layout_constraintStart_toStartOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/waveformSelection" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_edit_voice.xml b/app/src/main/res/layout/fragment_edit_voice.xml
new file mode 100644
index 0000000..629be4a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_edit_voice.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0076403..3d886c4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,6 +12,7 @@
+
diff --git a/app/src/main/java/com/lukas/music/EditVoiceFragment.kt b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
new file mode 100644
index 0000000..c121d46
--- /dev/null
+++ b/app/src/main/java/com/lukas/music/EditVoiceFragment.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2022 Lukas Eisenhauer
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License along with this program. If not, see .
+ */
+
+package com.lukas.music
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.DialogFragment
+import com.lukas.music.databinding.FragmentEditVoiceBinding
+import com.lukas.music.song.voice.Voice
+
+class EditVoiceFragment(val voice: Voice) : DialogFragment() {
+ private lateinit var binding: FragmentEditVoiceBinding
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ binding = FragmentEditVoiceBinding.inflate(inflater)
+ binding.closeButton.setOnClickListener {
+ dismiss()
+ }
+ return binding.root
+ }
+
+ override fun onStart() {
+ super.onStart()
+ dialog?.window?.setLayout(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
index cca8ddd..605906a 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/EditInstrumentFragment.kt
@@ -17,6 +17,7 @@
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
+import com.lukas.music.EditVoiceFragment
import com.lukas.music.databinding.FragmentEditInstrumentBinding
import com.lukas.music.instruments.Instrument
import com.lukas.music.instruments.Waveform
@@ -58,6 +59,9 @@
) {
instrument.voice = Voice.DEFAULT_VOICES[it].constructors.first().call(instrument)
}
+ binding.editVoiceButton.setOnClickListener {
+ EditVoiceFragment(instrument.voice).showNow(childFragmentManager, "")
+ }
binding.closeButton.setOnClickListener {
dismiss()
}
diff --git a/app/src/main/res/layout/fragment_edit_instrument.xml b/app/src/main/res/layout/fragment_edit_instrument.xml
index 2d5cf09..b5578fc 100644
--- a/app/src/main/res/layout/fragment_edit_instrument.xml
+++ b/app/src/main/res/layout/fragment_edit_instrument.xml
@@ -90,9 +90,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
+ android:layout_marginEnd="16dp"
android:contentDescription="@string/waveform"
android:minHeight="48dp"
- app:layout_constraintEnd_toEndOf="@+id/instrumentNameTextBox"
+ app:layout_constraintEnd_toStartOf="@+id/editVoiceButton"
app:layout_constraintStart_toEndOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/volumeSeek"
tools:ignore="DuplicateSpeakableTextCheck" />
@@ -135,4 +136,16 @@
app:layout_constraintStart_toStartOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/waveformSelection" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_edit_voice.xml b/app/src/main/res/layout/fragment_edit_voice.xml
new file mode 100644
index 0000000..629be4a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_edit_voice.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b493089..c3f3f86 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -41,4 +41,5 @@
Voice:
Add a new instrument
Delete this instrument
+ Edit voice
\ No newline at end of file