diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt index 13fcb9c182..3bb0a18ffd 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt @@ -239,9 +239,14 @@ abstract class VectorBaseActivity : AppCompatActivity(), Maver initUiAndData() - val toolbarBackgroundRes = R.color.modal_background_color - window.statusBarColor = ContextCompat.getColor(this, toolbarBackgroundRes) - window.navigationBarColor = ContextCompat.getColor(this, toolbarBackgroundRes) + try { + val toolbarBackground = MaterialColors.getColor(views.root, R.attr.vctr_toolbar_background) + window.statusBarColor = toolbarBackground + window.navigationBarColor = toolbarBackground + } catch (e: Exception) { + + } + val titleRes = getTitleRes() if (titleRes != -1) { supportActionBar?.let { diff --git a/vector/src/main/res/drawable/bg_modal_ripple_grey.xml b/vector/src/main/res/drawable/bg_modal_ripple_grey.xml index 951317b695..b42847c15f 100644 --- a/vector/src/main/res/drawable/bg_modal_ripple_grey.xml +++ b/vector/src/main/res/drawable/bg_modal_ripple_grey.xml @@ -7,6 +7,6 @@ + android:drawable="?attr/vctr_toolbar_background" /> diff --git a/vector/src/main/res/drawable/bg_space_modal.xml b/vector/src/main/res/drawable/bg_space_modal.xml index 847424087f..f5ba52d356 100644 --- a/vector/src/main/res/drawable/bg_space_modal.xml +++ b/vector/src/main/res/drawable/bg_space_modal.xml @@ -1,6 +1,6 @@ - + diff --git a/vector/src/main/res/drawable/ripple_grey.xml b/vector/src/main/res/drawable/ripple_grey.xml index 63f89683ac..530b915767 100644 --- a/vector/src/main/res/drawable/ripple_grey.xml +++ b/vector/src/main/res/drawable/ripple_grey.xml @@ -5,6 +5,6 @@ + android:drawable="?attr/vctr_toolbar_background" /> diff --git a/vector/src/main/res/layout/bottom_sheet_invites.xml b/vector/src/main/res/layout/bottom_sheet_invites.xml index 1ff8a7232d..ba1af0b872 100644 --- a/vector/src/main/res/layout/bottom_sheet_invites.xml +++ b/vector/src/main/res/layout/bottom_sheet_invites.xml @@ -3,6 +3,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="360dp" + android:background="?attr/vctr_toolbar_background" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> diff --git a/vector/src/main/res/layout/fragment_space_list_modal.xml b/vector/src/main/res/layout/fragment_space_list_modal.xml index da6d8631fb..59c37ddfa4 100644 --- a/vector/src/main/res/layout/fragment_space_list_modal.xml +++ b/vector/src/main/res/layout/fragment_space_list_modal.xml @@ -11,7 +11,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" - android:background="@color/modal_background_color" + android:background="?attr/vctr_toolbar_background" android:paddingBottom="8dp"> -