diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-22 21:39:43 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-22 21:39:43 +0100 |
commit | cccbbaa8ef67347743d7984f86ab2a6e0800ae59 (patch) | |
tree | 665cd1e75efd521166280cafc3f1dbb6462961c3 /src/main/java/de/pixart | |
parent | 5665a1a0a5a32e3f66bddd22221f2957746c9511 (diff) |
don't animate image view and set some variables final
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java index c333d1cb5..673124357 100644 --- a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java @@ -133,7 +133,7 @@ public class ShowFullscreenMessageActivity extends Activity { } } - private void DisplayImage(File file) { + private void DisplayImage(final File file) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(new File(file.getPath()).getAbsolutePath(), options); @@ -147,6 +147,7 @@ public class ShowFullscreenMessageActivity extends Activity { try { Glide.with(this) .load(file) + .dontAnimate() .into(new GlideDrawableImageViewTarget(mImage) { @Override public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> animation) { @@ -160,7 +161,7 @@ public class ShowFullscreenMessageActivity extends Activity { } } - private void DisplayVideo(Uri uri) { + private void DisplayVideo(final Uri uri) { MediaMetadataRetriever retriever = new MediaMetadataRetriever(); retriever.setDataSource(uri.getPath()); height = Integer.valueOf(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)); @@ -192,7 +193,7 @@ public class ShowFullscreenMessageActivity extends Activity { } } - private void rotateScreen(int width, int height, int rotation) { + private void rotateScreen(final int width, final int height, final int rotation) { if (width > height) { if (rotation == 0 || rotation == 180) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); |