开发者

Webview not showing scroll bars on rotation

开发者 https://www.devze.com 2023-02-24 00:28 出处:网络
When I load the WebView it shows the ScrollBar according to the current view and the content. If I rotate the Webview, then as scrollbars were not visible in portrait v开发者_StackOverflow中文版iew it

When I load the WebView it shows the ScrollBar according to the current view and the content. If I rotate the Webview, then as scrollbars were not visible in portrait v开发者_StackOverflow中文版iew it does not show them in the landscape view, even when they are required.

How can I force it to show?


Try setting the following properties in your WebView layout to true or false to show or hide respectively:

android:scrollbarAlwaysDrawHorizontalTrack android:scrollbarAlwaysDrawVerticalalTrack


WebView calculates its co-ordinates and hence determines to show scroll bar or not, at the time it is first rendered.

Those properties work only if the layout requires scrollbar in that orientation of the device

0

精彩评论

暂无评论...
验证码 换一张
取 消