Precautions for using WebView in viewpager in Android
Precautions for using WebView in viewpager in Android
preface:
I encountered a small problem while working on the project today
First, use viewpager to display multiple pages, and then use fragment to display data on each page. Some of the data is HTML tags loaded through WebView.
The specific XML layout is as follows
The problem is that when the data is loaded, the WebView will automatically move to the top of the page. If users want to view the textview content above the WebView, they must manually pull the page down
To solve the above problems, you can add the following attributes to the LinearLayout used in Scrollview:
If you have any questions, please leave a message or go to the community of this site for communication and discussion. Thank you for reading. I hope it can help you. Thank you for your support to this site!