tachiyomi/app/src/main/res/layout/material_fastscroll.xml
Jay e94e405b80 Adding fast scroll to d/l queue
Also fixed fast scroll bubbles with long titles
closes #270
2020-05-07 17:45:04 -04:00

54 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<View
android:id="@+id/fast_scroller_bar"
android:layout_width="7dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="@android:color/transparent"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end">
<!-- No margin, use padding at the handle -->
<com.google.android.material.textview.MaterialTextView
style="@style/FloatingTextView"
android:id="@+id/fast_scroller_bubble"
android:layout_gravity="end|center_vertical"
app:layout_constraintEnd_toStartOf="@+id/fast_scroller_handle"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:gravity="center"
app:layout_constrainedWidth="true"
android:layout_marginStart="52dp"
app:layout_constraintStart_toStartOf="parent"
android:maxLines="5"
android:visibility="gone"
app:layout_constraintHorizontal_bias="1.0"
tools:text="sdfs fas d fsA"
tools:visibility="visible"/>
<!-- Padding is here to have better grab -->
<ImageView
android:id="@+id/fast_scroller_handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:contentDescription="@null"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:paddingStart="6dp"
android:paddingEnd="4dp"
android:src="@drawable/thumb_drawable"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</merge>