Set light navigation bar

This commit is contained in:
Prathamesh More 2021-09-16 17:50:01 +05:30
parent 3722347305
commit cccbc2804e
4 changed files with 12 additions and 4 deletions

View file

@ -33,8 +33,6 @@ android {
buildTypes { buildTypes {
release { release {
//debuggable true //debuggable true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
debug { debug {

View file

@ -22,6 +22,7 @@ import code.name.monkey.retromusic.Constants.PRO_VERSION_PRODUCT_ID
import code.name.monkey.retromusic.appshortcuts.DynamicShortcutManager import code.name.monkey.retromusic.appshortcuts.DynamicShortcutManager
import com.anjlab.android.iab.v3.BillingProcessor import com.anjlab.android.iab.v3.BillingProcessor
import com.anjlab.android.iab.v3.TransactionDetails import com.anjlab.android.iab.v3.TransactionDetails
import com.google.android.material.color.DynamicColors
import org.koin.android.ext.koin.androidContext import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin import org.koin.core.context.startKoin
@ -45,11 +46,14 @@ class App : Application() {
.commit() .commit()
} }
DynamicColors.applyToActivitiesIfAvailable(this)
if (VersionUtils.hasNougatMR()) if (VersionUtils.hasNougatMR())
DynamicShortcutManager(this).initDynamicShortcuts() DynamicShortcutManager(this).initDynamicShortcuts()
// automatically restores purchases // automatically restores purchases
billingProcessor = BillingProcessor(this, BuildConfig.GOOGLE_PLAY_LICENSING_KEY, billingProcessor = BillingProcessor(
this, BuildConfig.GOOGLE_PLAY_LICENSING_KEY,
object : BillingProcessor.IBillingHandler { object : BillingProcessor.IBillingHandler {
override fun onProductPurchased(productId: String, details: TransactionDetails?) {} override fun onProductPurchased(productId: String, details: TransactionDetails?) {}

View file

@ -51,6 +51,7 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
registerSystemUiVisibility() registerSystemUiVisibility()
toggleScreenOn() toggleScreenOn()
setDrawUnderNavigationBar() setDrawUnderNavigationBar()
setLightNavigationAuto()
//MaterialDialogsUtil.updateMaterialDialogsThemeSingleton(this) //MaterialDialogsUtil.updateMaterialDialogsThemeSingleton(this)
} }
@ -150,6 +151,10 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
setNavigationbarColor(ATHUtil.resolveColor(this, R.attr.colorSurface)) setNavigationbarColor(ATHUtil.resolveColor(this, R.attr.colorSurface))
} }
fun setLightNavigationAuto() {
ATH.setLightNavigationbarAuto(this, surfaceColor())
}
open fun setLightStatusbar(enabled: Boolean) { open fun setLightStatusbar(enabled: Boolean) {
ATH.setLightStatusbar(this, enabled) ATH.setLightStatusbar(this, enabled)
} }

View file

@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"> android:background="?attr/colorSurface"
android:fitsSystemWindows="true">
<code.name.monkey.retromusic.views.BaselineGridTextView <code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/appNameText" android:id="@+id/appNameText"