Fix themes issues

This commit is contained in:
Lucas Lima 2020-08-24 23:06:57 -03:00
parent b9a5714a3c
commit 461c005406
No known key found for this signature in database
GPG key ID: C5EEF4C30BFBF8D7
3 changed files with 96 additions and 84 deletions

View file

@ -101,6 +101,7 @@ dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.activity:activity-ktx:1.1.0'
implementation 'androidx.fragment:fragment-ktx:1.2.5'
implementation 'androidx.cardview:cardview:1.0.0'
// Lifecycle
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'

View file

@ -1,99 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<GridLayout
android:id="@+id/parentGrid"
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:columnCount="3"
app:cardCornerRadius="4dp"
app:cardPreventCornerOverlap="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area0"
<GridLayout
android:id="@+id/parentGrid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:columnCount="3">
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0.5dp"
android:layout_marginEnd="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0.5dp"
android:layout_marginStart="0.5dp"
android:layout_marginEnd="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="0.5dp"
android:layout_marginBottom="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="0.5dp"
android:layout_marginBottom="0.5dp"
android:layout_marginTop="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="0.5dp"
android:layout_marginBottom="0.5dp"
android:layout_marginTop="0.5dp"/>
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0.5dp"
android:layout_marginEnd="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0.5dp"
android:layout_marginStart="0.5dp"
android:layout_marginEnd="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0.5dp"
android:layout_marginStart="0.5dp"/>
</GridLayout>
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
android:layout_gravity="center"
android:text="@string/system"
android:textAllCaps="true"
android:textStyle="bold" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0.5dp" />
<dev.lucasnlm.antimine.common.level.view.AreaView
android:id="@+id/area8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
android:layout_height="0dp"
android:clickable="true"
android:contentDescription="@string/themes"
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
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="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/themes"
android:focusable="true" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -402,8 +402,8 @@ object Themes {
background = 0xFFFFFF,
covered = 0x880e4f,
coveredOdd = 0x750b42,
uncovered = 0xf5f5f5,
uncoveredOdd = 0xfafafa,
uncovered = 0xd7ccc8,
uncoveredOdd = 0xefebe9,
minesAround1 = 0x616161,
minesAround2 = 0xe64a19,
minesAround3 = 0x8e24aa,