recycler: redesign fast scroller

- Use new "bump" design
- Base off fundamental RV primitives over custom item
calculations
- Make possible to use by non-home views
This commit is contained in:
Alexander Capehart
2024-11-07 20:52:48 -07:00
parent 8ec61c9388
commit fe6c07a342
14 changed files with 115 additions and 443 deletions
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,840L300,660L358,602L480,724L602,602L660,660L480,840ZM358,362L300,304L480,124L660,304L602,362L480,240L358,362Z"/>
</vector>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:tint="?attr/colorSecondary">
<corners android:radius="16dp" />
<size
android:width="56dp"
android:height="56dp" />
<solid android:color="@android:color/white" />
</shape>
@@ -3,14 +3,9 @@
android:shape="rectangle"
android:tint="?attr/colorSecondary">
<corners android:radius="8dp" />
<padding
android:bottom="4dp"
android:left="2dp"
android:right="2dp"
android:top="4dp" />
<corners android:topLeftRadius="24dp" android:bottomLeftRadius="24dp" />
<size
android:width="8dp"
android:height="52dp" />
android:width="48dp"
android:height="48dp" />
<solid android:color="@android:color/white" />
</shape>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<org.oxycblt.auxio.home.fastscroll.FastScrollRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
<org.oxycblt.auxio.list.recycler.FastScrollRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/home_recycler"
style="@style/Widget.Auxio.RecyclerView.Grid.WithAdaptiveFab"
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/ui_scroll_thumb">
<ImageView
android:layout_width="@dimen/size_touchable_small"
android:layout_height="@dimen/size_touchable_small"
app:tint="?attr/colorOnSecondary"
android:scaleType="centerInside"
android:src="@drawable/ic_scroll_24" />
</FrameLayout>
+3
View File
@@ -25,6 +25,9 @@
<dimen name="size_icon_large">40dp</dimen>
<dimen name="size_icon_huge">48dp</dimen>
<dimen name="width_scroll_thumb">48dp</dimen>
<dimen name="height_scroll_thumb">48dp</dimen>
<!-- Misc -->
<dimen name="m3_shape_corners_large">16dp</dimen>
<dimen name="m3_shape_corners_full">128dp</dimen>