Bottom color (#7287)
* TP-34350 | resolve comments * TP-34350 | bottom bar color
This commit is contained in:
committed by
GitHub
parent
f9f682b5b9
commit
f3f194acd6
@@ -18,6 +18,7 @@ import android.view.Menu
|
||||
import android.view.View
|
||||
import android.view.WindowInsetsController
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.forEach
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
@@ -42,6 +43,7 @@ import com.navi.base.utils.orFalse
|
||||
import com.navi.chat.data.NaviChatSystemDataHelper
|
||||
import com.navi.common.databinding.LayoutInAppInstallBinding
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.BOTTOM_BAR_COLOR_ENABLED
|
||||
import com.navi.common.juspay.HyperServicesHolder
|
||||
import com.navi.common.listeners.DialogCancelListener
|
||||
import com.navi.common.lottie.LottieRemoteHelper
|
||||
@@ -156,14 +158,21 @@ class NewDashboardActivity :
|
||||
}
|
||||
|
||||
private fun changeBottomNavColor(){
|
||||
if (!FirebaseRemoteConfigHelper.getBoolean(BOTTOM_BAR_COLOR_ENABLED)) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
window.insetsController?.setSystemBarsAppearance(
|
||||
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
|
||||
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
|
||||
WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS
|
||||
)
|
||||
}
|
||||
window.navigationBarColor = resources.getColor(com.navi.common.R.color.white)
|
||||
val windowInsetsController =
|
||||
ViewCompat.getWindowInsetsController(window.decorView)
|
||||
|
||||
windowInsetsController?.isAppearanceLightNavigationBars = true
|
||||
} catch (e: Exception) {
|
||||
FirebaseCrashlytics.getInstance().recordException(e)
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ object FirebaseRemoteConfigHelper {
|
||||
const val FC_ENABLED_FOR_ALL_VERSIONS = "FC_ENABLED_FOR_ALL_VERSIONS"
|
||||
const val PAYMENT_OPTIMISATION_DISABLE = "PAYMENT_OPTIMISATION_DISABLE"
|
||||
const val NAVI_PAY_ENABLED = "NAVI_PAY_ENABLED"
|
||||
const val BOTTOM_BAR_COLOR_ENABLED = "BOTTOM_BAR_COLOR_ENABLED"
|
||||
const val PRELOAD_HMS_NATIVE_LIB = "PRELOAD_HMS_NATIVE_LIB"
|
||||
|
||||
fun init() {
|
||||
|
||||
Reference in New Issue
Block a user