diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5c9d3cd..e3b7c48 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5c9d3cd..e3b7c48 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
index 6971014..597c100 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
@@ -16,7 +16,7 @@
import com.lukas.music.song.Song
class PlayFragment : Fragment() {
- lateinit var binding: FragmentPlayBinding
+ private lateinit var binding: FragmentPlayBinding
private val beatIndicators = mutableListOf()
private val chordDisplays = mutableListOf()
@@ -80,20 +80,14 @@
if (chordDisplays.isEmpty()) {
putChords()
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.index].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_400
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.index].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.purple_700)
)
if (Song.currentSong.chordProgression.currentItem.index == 0) {
return
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_600
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.gray_0x40)
)
}
@@ -129,14 +123,21 @@
chordDisplays.clear()
for (chord in Song.currentSong.chordProgression.currentItem) {
val card = CardView(binding.root.context)
+ card.layoutParams = SongFragment.tableRowLayout
+ card.radius = 10f
+ card.preventCornerOverlap = false
val text = TextView(binding.root.context)
text.text = chord.toString(true, Song.currentSong.root)
- card.layoutParams = SongFragment.layout
+ text.layoutParams = SongFragment.tableRowLayout
+ text.textSize = 20f
+ text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
card.addView(text)
binding.phraseDisplay.addView(card)
chordDisplays += card
}
binding.phraseTable.isStretchAllColumns = true
+ binding.nextChordText.text =
+ Song.currentSong.chordProgression.lookahead(1)[0].toString(true, Song.currentSong.root)
}
private external fun setMasterVolume(volume: Double)
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5c9d3cd..e3b7c48 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
index 6971014..597c100 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
@@ -16,7 +16,7 @@
import com.lukas.music.song.Song
class PlayFragment : Fragment() {
- lateinit var binding: FragmentPlayBinding
+ private lateinit var binding: FragmentPlayBinding
private val beatIndicators = mutableListOf()
private val chordDisplays = mutableListOf()
@@ -80,20 +80,14 @@
if (chordDisplays.isEmpty()) {
putChords()
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.index].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_400
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.index].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.purple_700)
)
if (Song.currentSong.chordProgression.currentItem.index == 0) {
return
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_600
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.gray_0x40)
)
}
@@ -129,14 +123,21 @@
chordDisplays.clear()
for (chord in Song.currentSong.chordProgression.currentItem) {
val card = CardView(binding.root.context)
+ card.layoutParams = SongFragment.tableRowLayout
+ card.radius = 10f
+ card.preventCornerOverlap = false
val text = TextView(binding.root.context)
text.text = chord.toString(true, Song.currentSong.root)
- card.layoutParams = SongFragment.layout
+ text.layoutParams = SongFragment.tableRowLayout
+ text.textSize = 20f
+ text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
card.addView(text)
binding.phraseDisplay.addView(card)
chordDisplays += card
}
binding.phraseTable.isStretchAllColumns = true
+ binding.nextChordText.text =
+ Song.currentSong.chordProgression.lookahead(1)[0].toString(true, Song.currentSong.root)
}
private external fun setMasterVolume(volume: Double)
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
index ed9ab76..78104e6 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
@@ -52,13 +52,15 @@
for (chord in phrase) {
val card = CardView(binding.root.context)
card.radius = 10f
- card.layoutParams = layout
+ card.layoutParams = tableRowLayout
card.setOnClickListener {
EditChordFragment(chord, this).showNow(childFragmentManager, "")
}
val text = TextView(binding.root.context)
text.text = chord.toString(displayChordNames, Song.currentSong.root)
- text.layoutParams = layout
+ text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
+ text.layoutParams = tableRowLayout
+ text.textSize = 20f
card.addView(text)
row.addView(card)
}
@@ -75,7 +77,7 @@
}
companion object {
- val layout = TableRow.LayoutParams(
+ val tableRowLayout = TableRow.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT,
TableRow.LayoutParams.MATCH_PARENT
)
@@ -85,7 +87,7 @@
)
init {
- layout.setMargins(10)
+ tableRowLayout.setMargins(10)
}
}
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5c9d3cd..e3b7c48 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
index 6971014..597c100 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
@@ -16,7 +16,7 @@
import com.lukas.music.song.Song
class PlayFragment : Fragment() {
- lateinit var binding: FragmentPlayBinding
+ private lateinit var binding: FragmentPlayBinding
private val beatIndicators = mutableListOf()
private val chordDisplays = mutableListOf()
@@ -80,20 +80,14 @@
if (chordDisplays.isEmpty()) {
putChords()
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.index].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_400
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.index].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.purple_700)
)
if (Song.currentSong.chordProgression.currentItem.index == 0) {
return
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_600
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.gray_0x40)
)
}
@@ -129,14 +123,21 @@
chordDisplays.clear()
for (chord in Song.currentSong.chordProgression.currentItem) {
val card = CardView(binding.root.context)
+ card.layoutParams = SongFragment.tableRowLayout
+ card.radius = 10f
+ card.preventCornerOverlap = false
val text = TextView(binding.root.context)
text.text = chord.toString(true, Song.currentSong.root)
- card.layoutParams = SongFragment.layout
+ text.layoutParams = SongFragment.tableRowLayout
+ text.textSize = 20f
+ text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
card.addView(text)
binding.phraseDisplay.addView(card)
chordDisplays += card
}
binding.phraseTable.isStretchAllColumns = true
+ binding.nextChordText.text =
+ Song.currentSong.chordProgression.lookahead(1)[0].toString(true, Song.currentSong.root)
}
private external fun setMasterVolume(volume: Double)
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
index ed9ab76..78104e6 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
@@ -52,13 +52,15 @@
for (chord in phrase) {
val card = CardView(binding.root.context)
card.radius = 10f
- card.layoutParams = layout
+ card.layoutParams = tableRowLayout
card.setOnClickListener {
EditChordFragment(chord, this).showNow(childFragmentManager, "")
}
val text = TextView(binding.root.context)
text.text = chord.toString(displayChordNames, Song.currentSong.root)
- text.layoutParams = layout
+ text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
+ text.layoutParams = tableRowLayout
+ text.textSize = 20f
card.addView(text)
row.addView(card)
}
@@ -75,7 +77,7 @@
}
companion object {
- val layout = TableRow.LayoutParams(
+ val tableRowLayout = TableRow.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT,
TableRow.LayoutParams.MATCH_PARENT
)
@@ -85,7 +87,7 @@
)
init {
- layout.setMargins(10)
+ tableRowLayout.setMargins(10)
}
}
diff --git a/app/src/main/res/layout/fragment_play.xml b/app/src/main/res/layout/fragment_play.xml
index 09eac44..fe27cd5 100644
--- a/app/src/main/res/layout/fragment_play.xml
+++ b/app/src/main/res/layout/fragment_play.xml
@@ -1,102 +1,131 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_margin="10dp"
+ android:text="Next chord not known yet . . ."
+ android:textSize="20sp"
+ tools:layout_conversion_absoluteHeight="27dp"
+ tools:layout_conversion_absoluteWidth="258dp" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5c9d3cd..e3b7c48 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
index 6971014..597c100 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/PlayFragment.kt
@@ -16,7 +16,7 @@
import com.lukas.music.song.Song
class PlayFragment : Fragment() {
- lateinit var binding: FragmentPlayBinding
+ private lateinit var binding: FragmentPlayBinding
private val beatIndicators = mutableListOf()
private val chordDisplays = mutableListOf()
@@ -80,20 +80,14 @@
if (chordDisplays.isEmpty()) {
putChords()
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.index].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_400
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.index].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.purple_700)
)
if (Song.currentSong.chordProgression.currentItem.index == 0) {
return
}
- chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setBackgroundColor(
- ContextCompat.getColor(
- binding.root.context,
- R.color.gray_600
- )
+ chordDisplays[Song.currentSong.chordProgression.currentItem.indexBehind].setCardBackgroundColor(
+ ContextCompat.getColor(binding.root.context, R.color.gray_0x40)
)
}
@@ -129,14 +123,21 @@
chordDisplays.clear()
for (chord in Song.currentSong.chordProgression.currentItem) {
val card = CardView(binding.root.context)
+ card.layoutParams = SongFragment.tableRowLayout
+ card.radius = 10f
+ card.preventCornerOverlap = false
val text = TextView(binding.root.context)
text.text = chord.toString(true, Song.currentSong.root)
- card.layoutParams = SongFragment.layout
+ text.layoutParams = SongFragment.tableRowLayout
+ text.textSize = 20f
+ text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
card.addView(text)
binding.phraseDisplay.addView(card)
chordDisplays += card
}
binding.phraseTable.isStretchAllColumns = true
+ binding.nextChordText.text =
+ Song.currentSong.chordProgression.lookahead(1)[0].toString(true, Song.currentSong.root)
}
private external fun setMasterVolume(volume: Double)
diff --git a/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt b/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
index ed9ab76..78104e6 100644
--- a/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
+++ b/app/src/main/java/com/lukas/music/ui/fragments/SongFragment.kt
@@ -52,13 +52,15 @@
for (chord in phrase) {
val card = CardView(binding.root.context)
card.radius = 10f
- card.layoutParams = layout
+ card.layoutParams = tableRowLayout
card.setOnClickListener {
EditChordFragment(chord, this).showNow(childFragmentManager, "")
}
val text = TextView(binding.root.context)
text.text = chord.toString(displayChordNames, Song.currentSong.root)
- text.layoutParams = layout
+ text.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
+ text.layoutParams = tableRowLayout
+ text.textSize = 20f
card.addView(text)
row.addView(card)
}
@@ -75,7 +77,7 @@
}
companion object {
- val layout = TableRow.LayoutParams(
+ val tableRowLayout = TableRow.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT,
TableRow.LayoutParams.MATCH_PARENT
)
@@ -85,7 +87,7 @@
)
init {
- layout.setMargins(10)
+ tableRowLayout.setMargins(10)
}
}
diff --git a/app/src/main/res/layout/fragment_play.xml b/app/src/main/res/layout/fragment_play.xml
index 09eac44..fe27cd5 100644
--- a/app/src/main/res/layout/fragment_play.xml
+++ b/app/src/main/res/layout/fragment_play.xml
@@ -1,102 +1,131 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_margin="10dp"
+ android:text="Next chord not known yet . . ."
+ android:textSize="20sp"
+ tools:layout_conversion_absoluteHeight="27dp"
+ tools:layout_conversion_absoluteWidth="258dp" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 66e3f6c..e691a4f 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -11,4 +11,14 @@
#FF039BE5
#FFBDBDBD
#FF757575
+ #101010
+ #202020
+ #303030
+ #404040
+ #505050
+ #606060
+ #707070
+ #808080
+ #909090
+ #A0A0A0
\ No newline at end of file