Simple Orientation (no WebView)?
-
Ccc's answer re orientation in a scene made me wonder why a similar approach wouldn't work with a ui.View. It seems it does?
import ui, console class SubView (ui.View): def __init__(self): self.present('panel') def layout(self): orientation = 'landscape' if self.frame[2] > self.frame[3] else 'portrait' console.hud_alert(orientation) SubView()
Edit: There's a difference I guess between device orientation and screen orientation, although they are linked in panel and full screen presents. A WebView gives access to device orientation I think, and the above to screen (or View) orientation.