Fixes app looking weird in non-light themes
This commit is contained in:
parent
9618c76dbd
commit
3a156cf8c8
|
@ -239,9 +239,14 @@ abstract class VectorBaseActivity<VB : ViewBinding> : 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 {
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
<!--this creates the mask with the ripple effect-->
|
||||
<item
|
||||
android:id="@+id/mask"
|
||||
android:drawable="@android:color/white" />
|
||||
android:drawable="?attr/vctr_toolbar_background" />
|
||||
|
||||
</ripple>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/modal_background_color"/>
|
||||
<solid android:color="?attr/vctr_toolbar_background"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="12dp"
|
||||
android:bottomRightRadius="12dp" />
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
<!--this creates the mask with the ripple effect-->
|
||||
<item
|
||||
android:id="@+id/mask"
|
||||
android:drawable="@android:color/white" />
|
||||
android:drawable="?attr/vctr_toolbar_background" />
|
||||
|
||||
</ripple>
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
||||
<TextView
|
||||
|
@ -71,7 +71,6 @@
|
|||
android:id="@+id/room_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/modal_background_color"
|
||||
app:layout_constraintTop_toBottomOf="@id/header_text_layout"
|
||||
app:layout_constraintBottom_toTopOf="@id/add_space_layout"
|
||||
tools:itemCount="3"
|
||||
|
@ -166,13 +165,14 @@
|
|||
app:layout_constraintTop_toTopOf="@id/add_space_icon_background"
|
||||
app:tint="?attr/vctr_spoiler_background_color" />
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/Widget.Vector.TextView.Body.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/add_space"
|
||||
android:textSize="17sp"
|
||||
android:textColor="?attr/vctr_message_text_color"
|
||||
app:layout_constraintBottom_toBottomOf="@id/add_space_icon_background"
|
||||
app:layout_constraintStart_toEndOf="@id/add_space_icon_background"
|
||||
app:layout_constraintTop_toTopOf="@id/add_space_icon_background" />
|
||||
|
|
Loading…
Reference in New Issue