aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-09-17 20:39:13 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-17 20:39:13 +0200
commit66480f401476d974f903465289830342028185ec (patch)
tree44991b13639402c1ab1acde534d481f739ed6782 /src/main/java/de/pixart/messenger
parent61b7e83316adc2e341fa80adbda6a6ba27f11ba0 (diff)
some bug fixes in FullScreenMessageActivity
* set fullscreen via theme * adjust brightness during onPause, onResume
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java16
1 files changed, 5 insertions, 11 deletions
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();
}