Tabbed bottom sheet adjustments (#6309)

* SimpleNavigationView: Don't set background and elevation

* Add divider for tabs in bottom sheet
This commit is contained in:
Ivan Iskandar 2021-12-04 21:57:29 +07:00 committed by GitHub
parent 458a0e608a
commit be0a23d9ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 14 deletions

View File

@ -43,17 +43,6 @@ open class SimpleNavigationView @JvmOverloads constructor(
R.style.Widget_Design_NavigationView R.style.Widget_Design_NavigationView
) )
setBackground(a.getDrawable(R.styleable.NavigationView_android_background))
if (a.hasValue(R.styleable.NavigationView_elevation)) {
setElevation(
a.getDimensionPixelSize(
R.styleable.NavigationView_elevation,
0
).toFloat()
)
}
a.recycle() a.recycle()
recycler.layoutManager = LinearLayoutManager(context) recycler.layoutManager = LinearLayoutManager(context)

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
</shape>
</item>
<item
android:gravity="bottom">
<shape>
<size android:height="1dp" />
<solid android:color="?attr/colorSurfaceVariant" />
</shape>
</item>
</layer-list>

View File

@ -12,11 +12,10 @@
<!-- Remove background color so rounded sheet corners work --> <!-- Remove background color so rounded sheet corners work -->
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
style="@style/Widget.Tachiyomi.TabLayout"
android:id="@+id/tabs" android:id="@+id/tabs"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@drawable/transparent_tabs_background"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/menu" app:layout_constraintEnd_toStartOf="@+id/menu"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall" android:layout_height="?attr/listPreferredItemHeightSmall"
android:background="?android:attr/colorBackground"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="?attr/listPreferredItemPaddingStart" android:paddingStart="?attr/listPreferredItemPaddingStart"