diff --git a/app/src/main/java/com/lukas/music/song/chords/Chord.kt b/app/src/main/java/com/lukas/music/song/chords/Chord.kt index 85e530b..98468f3 100644 --- a/app/src/main/java/com/lukas/music/song/chords/Chord.kt +++ b/app/src/main/java/com/lukas/music/song/chords/Chord.kt @@ -93,9 +93,9 @@ } accidentals[3]?.let { result += when (it) { - Accidental.Sharp -> " maj9" + Accidental.Sharp -> " ♯9" Accidental.None -> " 9" - Accidental.Flat -> " b9" + Accidental.Flat -> " ♭9" } } return result diff --git a/app/src/main/java/com/lukas/music/song/chords/Chord.kt b/app/src/main/java/com/lukas/music/song/chords/Chord.kt index 85e530b..98468f3 100644 --- a/app/src/main/java/com/lukas/music/song/chords/Chord.kt +++ b/app/src/main/java/com/lukas/music/song/chords/Chord.kt @@ -93,9 +93,9 @@ } accidentals[3]?.let { result += when (it) { - Accidental.Sharp -> " maj9" + Accidental.Sharp -> " ♯9" Accidental.None -> " 9" - Accidental.Flat -> " b9" + Accidental.Flat -> " ♭9" } } return result diff --git a/app/src/main/java/com/lukas/music/ui/fragments/EditChordFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/EditChordFragment.kt index 5fc9dfe..f5a5a71 100644 --- a/app/src/main/java/com/lukas/music/ui/fragments/EditChordFragment.kt +++ b/app/src/main/java/com/lukas/music/ui/fragments/EditChordFragment.kt @@ -33,7 +33,7 @@ override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? - ): View? { + ): View { binding = FragmentEditChordBinding.inflate(inflater) Array(Accidental.VALUES.size) { val button = MaterialButton(binding.root.context) @@ -76,15 +76,15 @@ private fun setupEditor() { binding.editorGrid.removeAllViews() - val row = TableRow(binding.root.context) + val tableRow = TableRow(binding.root.context) for (description in descriptions) { val text = TextView(binding.root.context) text.text = description text.layoutParams = UIUtil.cardLayout text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER - row.addView(text) + tableRow.addView(text) } - binding.editorGrid.addView(row) + binding.editorGrid.addView(tableRow) for (accidental in Accidental.VALUES) { val row = TableRow(binding.root.context) for (position in 0 until Chord.NOTE_COUNT - 1) { @@ -93,7 +93,7 @@ button.layoutParams = UIUtil.cardLayout button.updateToggle(chord.accidentals[position] == accidental, R.color.blue) button.setOnClickListener { - if (chord.accidentals[position] == accidental) { + if (chord.accidentals[position] == accidental && position != 1) { chord.accidentals[position] = null } else { chord.accidentals[position] = accidental