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

后端 未结 7 1666
梦如初夏
梦如初夏 2020-11-29 16:22

So I have a fascinating problem. Despite the fact that I\'m not manually or programmatically scrolling my view, my WebView is being automatically scrolled to after the data

7条回答
  •  执笔经年
    2020-11-29 16:47

    Probably there are people who have the same problem I was having, so I'll help out.

    I was trying to put android:descendantFocusability="beforeDescendants" in my main ScrollView as following:

    
        /*my linearlayout or whatever to hold the views */
    

    and it wasn't working, so I had to make a RelativeLayout the parent of the ScrollView, and place the android:descendantFocusability="beforeDescendants" in the parent aswell.

    So I solved it doing the following:

    
    
    
    /*my linearlayout or whatever to hold the views */
    

提交回复
热议问题