mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Tabbed bottom sheet adjustments (#6309)
* SimpleNavigationView: Don't set background and elevation * Add divider for tabs in bottom sheet
This commit is contained in:
parent
458a0e608a
commit
be0a23d9ad
4 changed files with 17 additions and 14 deletions
|
@ -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)
|
||||||
|
|
16
app/src/main/res/drawable/transparent_tabs_background.xml
Normal file
16
app/src/main/res/drawable/transparent_tabs_background.xml
Normal 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>
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue