aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/AndroidManifest.xml1
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java16
2 files changed, 6 insertions, 11 deletions
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index 7a6201974..4298baf40 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -221,6 +221,7 @@
</activity>
<activity
android:name="de.pixart.messenger.ui.ShowFullscreenMessageActivity"
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true">
</activity>
diff --git a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
index 5aef4b112..bca5ee183 100644
--- a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
@@ -34,7 +34,7 @@ import uk.co.senab.photoview.PhotoViewAttacher;
public class ShowFullscreenMessageActivity extends Activity {
- Integer oldOrientation = getRequestedOrientation();
+ Integer oldOrientation;
PhotoView mImage;
FullscreenVideoLayout mVideo;
ImageView mFullscreenbutton;
@@ -47,20 +47,12 @@ public class ShowFullscreenMessageActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ oldOrientation = getRequestedOrientation();
+
WindowManager.LayoutParams layout = getWindow().getAttributes();
layout.screenBrightness = 1;
getWindow().setAttributes(layout);
- getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- getActionBar().hide();
- if (Build.VERSION.SDK_INT < 16) {
- getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
- WindowManager.LayoutParams.FLAG_FULLSCREEN);
- } else {
- View decorView = getWindow().getDecorView();
- int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
- decorView.setSystemUiVisibility(uiOptions);
- }
setContentView(R.layout.activity_fullscreen_message);
mImage = (PhotoView) findViewById(R.id.message_image_view);
mVideo = (FullscreenVideoLayout) findViewById(R.id.message_video_view);
@@ -208,6 +200,8 @@ public class ShowFullscreenMessageActivity extends Activity {
protected void onResume() {
WindowManager.LayoutParams layout = getWindow().getAttributes();
layout.screenBrightness = 1;
+ getWindow().setAttributes(layout);
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mVideo.setShouldAutoplay(true);
super.onResume();
}