mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Adds white status and navigation bars
This commit is contained in:
parent
7334d909d5
commit
7de82e0204
2 changed files with 13 additions and 1 deletions
|
@ -50,6 +50,7 @@ import androidx.viewbinding.ViewBinding
|
|||
import com.airbnb.mvrx.MavericksView
|
||||
import com.bumptech.glide.util.Util
|
||||
import com.google.android.material.appbar.MaterialToolbar
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import dagger.hilt.android.EntryPointAccessors
|
||||
|
@ -72,6 +73,7 @@ import im.vector.app.core.utils.ToolbarConfig
|
|||
import im.vector.app.core.utils.toast
|
||||
import im.vector.app.features.MainActivity
|
||||
import im.vector.app.features.MainActivityArgs
|
||||
import im.vector.app.features.VectorFeatures
|
||||
import im.vector.app.features.analytics.AnalyticsTracker
|
||||
import im.vector.app.features.analytics.plan.MobileScreen
|
||||
import im.vector.app.features.configuration.VectorConfiguration
|
||||
|
@ -161,6 +163,9 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
|
|||
@Inject
|
||||
lateinit var fontScalePreferences: FontScalePreferences
|
||||
|
||||
@Inject
|
||||
lateinit var vectorFeatures: VectorFeatures
|
||||
|
||||
lateinit var navigator: Navigator
|
||||
private set
|
||||
private lateinit var fragmentFactory: FragmentFactory
|
||||
|
@ -253,6 +258,14 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
|
|||
|
||||
initUiAndData()
|
||||
|
||||
if (vectorFeatures.isNewAppLayoutEnabled()) {
|
||||
tryOrNull { // TODO: Add to XML theme when feature flag is removed
|
||||
val toolbarBackground = MaterialColors.getColor(views.root, R.attr.vctr_toolbar_background)
|
||||
window.statusBarColor = toolbarBackground
|
||||
window.navigationBarColor = toolbarBackground
|
||||
}
|
||||
}
|
||||
|
||||
val titleRes = getTitleRes()
|
||||
if (titleRes != -1) {
|
||||
supportActionBar?.let {
|
||||
|
|
|
@ -126,7 +126,6 @@ class HomeActivity :
|
|||
@Inject lateinit var pushManager: PushersManager
|
||||
@Inject lateinit var notificationDrawerManager: NotificationDrawerManager
|
||||
@Inject lateinit var vectorPreferences: VectorPreferences
|
||||
@Inject lateinit var vectorFeatures: VectorFeatures
|
||||
@Inject lateinit var popupAlertManager: PopupAlertManager
|
||||
@Inject lateinit var shortcutsHandler: ShortcutsHandler
|
||||
@Inject lateinit var permalinkHandler: PermalinkHandler
|
||||
|
|
Loading…
Reference in a new issue