Unify fast-scroller
Completely unify the fast scroll indicators and the fast scroll thumb into a single view.
This commit is contained in:
@@ -39,13 +39,5 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/song_toolbar" />
|
||||
|
||||
<org.oxycblt.auxio.songs.FastScrollThumb
|
||||
android:id="@+id/song_fast_scroll_thumb"
|
||||
android:layout_width="@dimen/width_thumb_view"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/song_fast_scroll"
|
||||
app:layout_constraintTop_toBottomOf="@+id/song_toolbar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<merge
|
||||
tools:layout_height="match_parent"
|
||||
tools:layout_width="match_parent"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/scroll_thumb"
|
||||
android:layout_width="@dimen/size_scroll_thumb"
|
||||
android:layout_height="@dimen/size_scroll_thumb"
|
||||
android:background="@drawable/ui_circle"
|
||||
android:elevation="@dimen/elevation_small"
|
||||
android:backgroundTint="?attr/colorPrimary"
|
||||
android:stateListAnimator="@animator/animator_thumb"
|
||||
app:layout_constraintEnd_toStartOf="@+id/scroll_indicator_text">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scroll_thumb_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/text_size_thumb"
|
||||
android:textColor="?android:attr/windowBackground"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
tools:text="A" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scroll_indicator_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="@dimen/padding_tiny"
|
||||
android:paddingTop="@dimen/padding_tiny"
|
||||
android:paddingBottom="@dimen/padding_tiny"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="A\nB\n\C\nD\nE" />
|
||||
|
||||
</merge>
|
||||
</layout>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Animator from IndicatorFastScroll (https://github.com/reddit/IndicatorFastScroll) -->
|
||||
<layout>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:layout_height="match_parent"
|
||||
tools:layout_width="@dimen/size_scroll_thumb"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/thumb_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/ui_circular_button"
|
||||
android:elevation="@dimen/elevation_small"
|
||||
android:stateListAnimator="@animator/animator_thumb"
|
||||
app:layout_constraintDimensionRatio="W,1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/thumb_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
tools:text="A" />
|
||||
|
||||
</FrameLayout>
|
||||
</merge>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user