Allow scrolling when dragging across lead text
Allow scrolling when dragging across lead text

TLDR: Disable text selection of title and subtitle TextViews so the
WebView can handle the touch events.

The lead title and subtitle TextViews allowed text selections. Text
selection was desirable but had the side effect of stealing the scroll
touch events from the WebView.

As a work around, I tried always returning false in
TextView.onTouchEvent() but while this allowed both text selection and
scrolling, it more often than not allowed both to occur simultaneously
which was a poor experience.

The proper implementation seems to be to put the title container within
the WebView (a ViewGroup, after all), or to create a reusable "TouchFilter"
ViewGroup and wrap the WebView and title container, and implement
ScrollView-like functionality. I tried this approach from a couple tacts
but it proved nontrivial to implement natural scrolling robustly.

In one approach, I used SimpleOnGestureListener in
ViewGroup.onInterceptTouchEvent() to listen for scroll and fling events.
Since the TextViews don't scroll or fling, I would manually route these
to the appropriate scrollBy() / flingBy() methods on the WebView and
then intercept subsequent ACTION_MOVE events. This sort of worked but
just didn't feel right. The scrolling felt off because it happened once
in the OnGestureListener callback with any remaining scrolling happening
in ViewGroup.onTouchEvent().

In another approach, I recorded the y position on down events in
ViewGroup.onInterceptTouch(). In subsequent move events, I checked the y
against a scaled touch slop to determine if it was jitter or a scroll,
with the latter returning true. This sort of worked but suffered the
same unnatural feeling as the first.

Bug: T97504
Change-Id: I9e545c9a811840382ab11a022375bbcaf60825fd

carloshwa/apps-android-wikipedia,Wikinaut/wikipedia-app,anirudh24seven/apps-android-wikipedia,Duct-and-rice/KrswtkhrWiki4Android,Duct-and-rice/KrswtkhrWiki4Android,parvez3019/apps-android-wikipedia,Duct-and-rice/KrswtkhrWiki4Android,anirudh24seven/apps-android-wikipedia,wikimedia/apps-android-wikipedia,carloshwa/apps-android-wikipedia,SAGROUP2/apps-android-wikipedia,dbrant/apps-android-wikipedia,Wikinaut/wikipedia-app,anirudh24seven/apps-android-wikipedia,carloshwa/apps-android-wikipedia,parvez3019/apps-android-wikipedia,Wikinaut/wikipedia-app,Wikinaut/wikipedia-app,SAGROUP2/apps-android-wikipedia,SAGROUP2/apps-android-wikipedia,SAGROUP2/apps-android-wikipedia,wikimedia/apps-android-wikipedia,Duct-and-rice/KrswtkhrWiki4Android,carloshwa/apps-android-wikipedia,Wikinaut/wikipedia-app,dbrant/apps-android-wikipedia,parvez3019/apps-android-wikipedia,dbrant/apps-android-wikipedia,parvez3019/apps-android-wikipedia,carloshwa/apps-android-wikipedia,anirudh24seven/apps-android-wikipedia,dbrant/apps-android-wikipedia,wikimedia/apps-android-wikipedia,anirudh24seven/apps-android-wikipedia,SAGROUP2/apps-android-wikipedia,dbrant/apps-android-wikipedia,parvez3019/apps-android-wikipedia,Duct-and-rice/KrswtkhrWiki4Android,wikimedia/apps-android-wikipedia