How to prevent a scrollview from scrolling to a webview after data is loaded?

I had the same problem, after hours of trying several ideas, what finally worked for me was simply adding the descendantFocusability attribute to the ScrollView's containing LinearLayout, with the value blocksDescendants. In your case:

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:descendantFocusability="blocksDescendants" >

Haven't had the problem reoccur since.


You can simply add this to your LinearLayout: android:focusableInTouchMode="true". It works for me.

 <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusableInTouchMode="true"
    android:orientation="vertical" >