material_fastscroll.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <merge xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:layout_width="wrap_content"
  5. android:layout_height="match_parent">
  6. <View
  7. android:id="@+id/fast_scroller_bar"
  8. android:layout_width="7dp"
  9. android:layout_height="match_parent"
  10. android:layout_gravity="end"
  11. android:background="@null" />
  12. <RelativeLayout
  13. android:layout_width="wrap_content"
  14. android:layout_height="wrap_content"
  15. android:layout_gravity="end">
  16. <!-- No margin, use padding at the handle -->
  17. <com.google.android.material.textview.MaterialTextView
  18. android:id="@+id/fast_scroller_bubble"
  19. style="@style/FloatingTextView"
  20. android:layout_gravity="end|center_vertical"
  21. android:layout_toStartOf="@+id/fast_scroller_handle"
  22. android:gravity="center"
  23. android:visibility="gone"
  24. tools:text="A"
  25. tools:visibility="visible" />
  26. <!-- Padding is here to have better grab -->
  27. <ImageView
  28. android:id="@+id/fast_scroller_handle"
  29. android:layout_width="wrap_content"
  30. android:layout_height="wrap_content"
  31. android:layout_alignParentEnd="true"
  32. android:contentDescription="@null"
  33. android:paddingStart="6dp"
  34. android:paddingEnd="4dp"
  35. android:src="@drawable/material_thumb_drawable" />
  36. </RelativeLayout>
  37. </merge>