Merge pull request #145 from lucasnlm/add-themes-feature
Fix Kitkat themes
This commit is contained in:
commit
6e421ca86f
10 changed files with 51 additions and 11 deletions
|
@ -9,8 +9,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 800001
|
||||
versionName '8.0.0'
|
||||
versionCode 800011
|
||||
versionName '8.0.1'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
multiDexEnabled true
|
||||
|
|
|
@ -13,6 +13,7 @@ import androidx.activity.viewModels
|
|||
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.TooltipCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.os.HandlerCompat.postDelayed
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
|
@ -229,6 +230,10 @@ class GameActivity : ThematicActivity(R.layout.activity_game), DialogInterface.O
|
|||
drawer.openDrawer(GravityCompat.START)
|
||||
}
|
||||
}
|
||||
|
||||
minesCount.setCompoundDrawablesWithIntrinsicBounds(
|
||||
ContextCompat.getDrawable(this, usingTheme.assets.toolbarMine), null, null, null
|
||||
)
|
||||
}
|
||||
|
||||
private fun refreshNewGameButton() {
|
||||
|
|
|
@ -9,8 +9,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 800001
|
||||
versionName '8.0.0'
|
||||
versionCode 800011
|
||||
versionName '8.0.1'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
|
|
|
@ -6,6 +6,7 @@ data class Assets(
|
|||
@DrawableRes val wrongFlag: Int,
|
||||
@DrawableRes val flag: Int,
|
||||
@DrawableRes val questionMark: Int,
|
||||
@DrawableRes val toolbarMine: Int,
|
||||
@DrawableRes val mine: Int,
|
||||
@DrawableRes val mineExploded: Int,
|
||||
@DrawableRes val mineLow: Int
|
||||
|
|
|
@ -52,6 +52,7 @@ class ThemeRepository(
|
|||
wrongFlag = R.drawable.red_flag,
|
||||
flag = R.drawable.flag,
|
||||
questionMark = R.drawable.question,
|
||||
toolbarMine = R.drawable.mine,
|
||||
mine = R.drawable.mine,
|
||||
mineExploded = R.drawable.mine_exploded_red,
|
||||
mineLow = R.drawable.mine_low
|
||||
|
|
|
@ -30,6 +30,7 @@ object Themes {
|
|||
wrongFlag = R.drawable.red_flag,
|
||||
flag = R.drawable.flag,
|
||||
questionMark = R.drawable.question,
|
||||
toolbarMine = R.drawable.mine,
|
||||
mine = R.drawable.mine,
|
||||
mineExploded = R.drawable.mine_exploded_red,
|
||||
mineLow = R.drawable.mine_low
|
||||
|
@ -60,6 +61,7 @@ object Themes {
|
|||
wrongFlag = R.drawable.flag,
|
||||
flag = R.drawable.flag,
|
||||
questionMark = R.drawable.question,
|
||||
toolbarMine = R.drawable.mine_low,
|
||||
mine = R.drawable.mine,
|
||||
mineExploded = R.drawable.mine_exploded_white,
|
||||
mineLow = R.drawable.mine_low
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight">
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
|
@ -22,4 +22,35 @@
|
|||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.DayNight.ActionBar" />
|
||||
|
||||
<style name="CustomLightTheme" parent="ThemeOverlay.AppCompat.Light">
|
||||
<item name="colorPrimary">#FFFFFF</item>
|
||||
<item name="colorPrimaryDark">#9E9E9E</item>
|
||||
<item name="colorAccent">#D32F2F</item>
|
||||
<item name="android:background">#FFFFFF</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomLightTheme.NoActionBar" parent="ThemeOverlay.AppCompat.Light">
|
||||
<item name="colorPrimary">#FFFFFF</item>
|
||||
<item name="colorPrimaryDark">#9E9E9E</item>
|
||||
<item name="colorAccent">#D32F2F</item>
|
||||
<item name="android:background">#FFFFFF</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomDarkTheme" parent="ThemeOverlay.AppCompat.Dark">
|
||||
<item name="colorPrimary">#212121</item>
|
||||
<item name="colorPrimaryDark">#212121</item>
|
||||
<item name="colorAccent">#FFFFFF</item>
|
||||
<item name="android:background">#212121</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomDarkTheme.NoActionBar" parent="ThemeOverlay.AppCompat.Dark">
|
||||
<item name="colorPrimary">#212121</item>
|
||||
<item name="colorPrimaryDark">#212121</item>
|
||||
<item name="colorAccent">#FFFFFF</item>
|
||||
<item name="android:background">#212121</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -6,8 +6,8 @@ android {
|
|||
compileSdkVersion 30
|
||||
|
||||
defaultConfig {
|
||||
versionCode 800001 // MMmmPPv
|
||||
versionName '8.0.0'
|
||||
versionCode 800011 // MMmmPPv
|
||||
versionName '8.0.1'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ android {
|
|||
compileSdkVersion 30
|
||||
|
||||
defaultConfig {
|
||||
versionCode 800001 // MMmmPPv
|
||||
versionName '8.0.0'
|
||||
versionCode 800011 // MMmmPPv
|
||||
versionName '8.0.1'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 800001
|
||||
versionName '8.0.0'
|
||||
versionCode 800011
|
||||
versionName '8.0.1'
|
||||
applicationId 'dev.lucasnlm.antimine'
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
|
|
Loading…
Reference in a new issue