mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
app, app/internal: [wasm,android] new Option to set Orientation
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -134,6 +134,13 @@ public final class GioView extends SurfaceView implements Choreographer.FrameCal
|
||||
setPointerIcon(pointerIcon);
|
||||
}
|
||||
|
||||
private void setOrientation(int id, int fallback) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
id = fallback;
|
||||
}
|
||||
((Activity) this.getContext()).setRequestedOrientation(id);
|
||||
}
|
||||
|
||||
private enum Bar {
|
||||
NAVIGATION,
|
||||
STATUS,
|
||||
|
||||
Reference in New Issue
Block a user