Add system label to default theme
This commit is contained in:
parent
74f37568a6
commit
a37d361ccd
3 changed files with 31 additions and 2 deletions
|
@ -57,8 +57,24 @@ class ThemeAdapter(
|
|||
val theme = themes[position]
|
||||
val paintSettings = createAreaPaintSettings(holder.itemView.context, areaSize)
|
||||
holder.itemView.run {
|
||||
arrayOf(area0, area1, area2, area3, area4, area5, area6, area7, area8)
|
||||
.forEachIndexed { index, areaView -> areaView.bindTheme(minefield[index], theme, paintSettings) }
|
||||
val areas = listOf(area0, area1, area2, area3, area4, area5, area6, area7, area8)
|
||||
|
||||
areas.forEachIndexed { index, areaView -> areaView.bindTheme(minefield[index], theme, paintSettings) }
|
||||
|
||||
if (position == 0) {
|
||||
areas.forEach { it.alpha = 0.35f }
|
||||
|
||||
label.apply {
|
||||
setTextColor(with(theme.palette.background) {
|
||||
Color.rgb(255 - Color.red(this), 255 - Color.green(this), 255 - Color.blue(this))
|
||||
})
|
||||
setBackgroundResource(android.R.color.transparent)
|
||||
visibility = View.VISIBLE
|
||||
}
|
||||
} else {
|
||||
label.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
||||
val color = with(theme.palette.background) {
|
||||
Color.rgb(Color.red(this), Color.green(this), Color.blue(this))
|
||||
|
|
|
@ -72,6 +72,18 @@
|
|||
android:layout_margin="0.5dp" />
|
||||
</GridLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
android:text="@string/system"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/clickTheme"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<string name="settings_accessibility">Accessibility</string>
|
||||
<string name="settings_large_areas">Use Large Areas</string>
|
||||
<string name="size">Size</string>
|
||||
<string name="system">System</string>
|
||||
<string name="rating">Feedback</string>
|
||||
<string name="rating_message">If you like this game, please give us a feedback. It will help us a lot.</string>
|
||||
<string name="used_software_text">This game uses the following third parties software:</string>
|
||||
|
|
Loading…
Reference in a new issue