Reputation: 657
Hello it's possible to block, landscape view just for Smartphones, but not for Tab's or bigger devices?
Upvotes: 4
Views: 675
Reputation: 744
It all depends on the container holding your webview.
In android you can block orientationchanges, even changes under certain conditions, on your activity. The overridable method "onConfigurationChanged(Configuration newConfig)" is responsible for this.
On iOS you can do this on the ViewController. This post describes how to do it: iOS 6 - How to run custom code when orientation changes.
It is also possible to do this from the configuration files of the project. For iOS you can block certain views for certain device types. With Android this is only possible to block landscape mode entirely.
If you are feeling adventurous, there is also the option to CSS-transform your view, though this is more of a hack than a real solution: Prevent orientation change in iOS Safari
Upvotes: 1