WebView scrolling issue in android?

I tried many options, but my webview does not scroll vertically, as it scrolls horizontally. I added webview to my android app to show some kind of web content in the app. Content is just text. But this is more than the height of the webview, so I want to give the user the ability to scroll to view the contents of the next page. But webview does not scroll horizontally.

Here is xml and I juss load the html string into it.

<WebView android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="200dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="10dp" /> 

Please help me and suggest the best solution. Thanks in advance.

0
source share
3 answers

Actually, I am webview inside the scrollview . Thus, it stops the vertical scroll.

+1
source

@sanchitsingh

If you use webview in side scrolling, you have problems scrolling vertically because vertical scrolling and webview also have their own scrollbars for scrolling both horizontally and vertically, and when you use webview in scrollview, then Device / OS does not recognize which view is scrolling so that it cannot scroll web browsing

+1
source

How long is the file displayed? If it just contains text, what is the likelihood that the text is wrapped and, therefore, correctly adjusted in width. Thus, he did not need any vertical scrolling!

+1
source

Source: https://habr.com/ru/post/913124/


All Articles