I was trying to implement the scrollView and scroll using the scrollbar. But, It isn't working.
This is whole xml file.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ScrollingActivity">
<ScrollView
android:id="@+id/scroll"
android:layout_width="wrap_content"
android:scrollbars="vertical"
android:scrollbarThumbVertical="@color/teal_200"
android:scrollbarSize="20dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/large_text"/>
</ScrollView>
</LinearLayout>
and java is default file.
Main Issue
ScrollBar is appearing and can be seen by user. ScrollBar changes the position as well. But, when User wants to scroll using scrollbar, scrollbar isn't responding. It's like we cannot touch the scrollbar, Instead the textView is selected will be swiped.
My Reasearch
Before anything, I did try to implement GestureDetecter as well as went through several links and google.
These are just two links which is most related to my issue. So, I tried to implement customScrollView as well. Which resulted in app crash. There was use of deprecated api too. So, I didn't bother to solve the issue. Instead I focused on replacing that api and getting that class working. But, unfortunately even I got the replacement it wasn't working. I skipped the file because it was way lengthy.