How to make WebView content appear vertically only? So, as if we turned the phone on the landscape.
I tried to register in .xml WebView - android:screenOrientation="landscape" . Nothing changed.
How to make WebView content appear vertically only? So, as if we turned the phone on the landscape.
I tried to register in .xml WebView - android:screenOrientation="landscape" . Nothing changed.
Perhaps you just need to rotate your markup element:
android:rotation="90.0"
webView.setRotation(90.0f);
You can, for example, in the Activity at the right time force the orientation to vertical:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); WebView For landscape-orientation. - Vladyslav MatviienkoSource: https://ru.stackoverflow.com/questions/483735/
All Articles