Skip to content

Instantly share code, notes, and snippets.

@abarth
Last active August 29, 2015 14:16
Show Gist options
  • Save abarth/fb7a3d5c6e58f44d21d9 to your computer and use it in GitHub Desktop.
Save abarth/fb7a3d5c6e58f44d21d9 to your computer and use it in GitHub Desktop.
diff --git a/sky/shell/org/domokit/sky/shell/SkyActivity.java b/sky/shell/org/domokit/sky/shell/SkyActivity.java
index b0eb9c0..431c4ef 100644
--- a/sky/shell/org/domokit/sky/shell/SkyActivity.java
+++ b/sky/shell/org/domokit/sky/shell/SkyActivity.java
@@ -7,6 +7,9 @@ package org.domokit.sky.shell;
import android.app.Activity;
import android.os.Bundle;
+import android.view.WindowManager;
+import android.view.Window;
+
/**
* Base class for activities that use Sky.
*/
@@ -22,6 +25,15 @@ public class SkyActivity extends Activity {
SkyMain.ensureInitialized(getApplicationContext());
mView = new PlatformView(this);
setContentView(mView);
+
+ Window win = getWindow();
+ win.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+ WindowManager.LayoutParams.FLAG_FULLSCREEN);
+
+ int rotationAnimation = WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT;
+ WindowManager.LayoutParams winParams = win.getAttributes();
+ winParams.rotationAnimation = rotationAnimation;
+ win.setAttributes(winParams);
}
public void loadUrl(String url) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment