Fix: Background Color of some surfaces on old devices (Closes #73)

This commit is contained in:
LooKeR 2021-10-29 16:41:51 +05:30
parent 07d7334e76
commit 318a582b02
3 changed files with 2 additions and 3 deletions

View File

@ -264,7 +264,6 @@ class TabsFragment : ScreenFragment() {
this.adapter = adapter this.adapter = adapter
addItemDecoration(DividerItemDecoration(context, adapter::configureDivider)) addItemDecoration(DividerItemDecoration(context, adapter::configureDivider))
background = context.getDrawableCompat(R.drawable.background_border) background = context.getDrawableCompat(R.drawable.background_border)
backgroundTintList = context.getColorFromAttr(R.attr.colorSurface)
elevation = resources.sizeScaled(4).toFloat() elevation = resources.sizeScaled(4).toFloat()
content.addView(this) content.addView(this)
val margins = resources.sizeScaled(8) val margins = resources.sizeScaled(8)

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?attr/colorSurface"/>
<corners android:radius="@dimen/shape_large_corner" /> <corners android:radius="@dimen/shape_large_corner" />
</shape> </shape>

View File

@ -6,7 +6,6 @@
android:layout_marginHorizontal="12dp" android:layout_marginHorizontal="12dp"
android:layout_marginVertical="4dp" android:layout_marginVertical="4dp"
android:background="@drawable/background_border" android:background="@drawable/background_border"
android:backgroundTint="?attr/colorSurface"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
@ -114,7 +113,7 @@
android:layout_weight="1" android:layout_weight="1"
app:cardBackgroundColor="?attr/colorSurface" app:cardBackgroundColor="?attr/colorSurface"
app:cardCornerRadius="@dimen/shape_medium_corner" app:cardCornerRadius="@dimen/shape_medium_corner"
app:cardElevation="0dp" app:cardElevation="2dp"
app:strokeWidth="0dp"> app:strokeWidth="0dp">
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat