diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-06-23 19:21:38 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-23 19:21:38 +0200 |
commit | acf422cbcd6e8637e13dd079dd948dabaab974c6 (patch) | |
tree | 06b62369cf215cb250670a70447cce4ebea634e9 /src/main/java/eu | |
parent | 6330be2152e56afad4ae9a59da9da0900500ba05 (diff) |
show image/video in fullscreen
Diffstat (limited to 'src/main/java/eu')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java index 6e5593f03..e59df4d28 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java @@ -5,6 +5,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.graphics.Bitmap; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.view.View; import android.view.Window; @@ -15,7 +16,6 @@ import android.widget.Toast; import com.bumptech.glide.Glide; import com.bumptech.glide.request.animation.GlideAnimation; import com.bumptech.glide.request.target.BitmapImageViewTarget; -import com.bumptech.glide.signature.StringSignature; import com.github.rtoshiro.view.video.FullscreenVideoLayout; import java.io.File; @@ -43,6 +43,14 @@ public class ShowFullscreenMessageActivity extends Activity { getWindow().requestFeature(Window.FEATURE_ACTION_BAR); getWindow().addFlags(layout.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); |