turing-tech / MaterialScrollBar

An Android library that brings the Material Design 5.1 sidebar to pre-5.1 devices.
Apache License 2.0
781 stars 126 forks source link

Increase the touch area #107

Open jooleeanh opened 6 years ago

jooleeanh commented 6 years ago

I couldn't find any documentation on how to increase the touch area of the DragScrollBar (it's pretty hard to catch it unless you make it pretty fat).

In the end, I've found a work around and thought I'd leave it here in case anyone was looking to do the same and would be looking here. Maybe add to the documentation ?

You can increase the touch zone by simultaneously increasing: app:msb_barThickness android:paddingRight android:layout_marginRight In my case, here are the settings I used:

<com.turingtechnologies.materialscrollbar.DragScrollBar
        android:id="@+id/DragScrollBar"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:paddingRight="16dp"
        android:paddingEnd="16dp"
        android:layout_marginRight="8dp"
        android:layout_marginEnd="8dp"
        app:msb_barColor="@color/Grey"
        app:msb_handleColor="@color/Green"
        app:msb_lightOnTouch="false"
        app:msb_barThickness="32dp"
        app:msb_recyclerView="@+id/RecyclerView"
        app:msb_textColor="@color/White" />
turing-tech commented 6 years ago

Triaged for a future release