aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-01-18 21:14:17 +0100
committerChristian Schneppe <christian@pix-art.de>2017-01-18 21:14:17 +0100
commitde4accb0ee412aabd12c74938e05008b7ca6956b (patch)
treeb7fb71273c3bed07b0179498fff25441e2396c28 /src/main/java
parent6611f60cdfbf5b6be453d84cffd298fafbcc0a03 (diff)
Revert "play gif files in fullscreen view"
This reverts commit 4d4d8f98e9824f31eae2ce00af2b2b618243d87f.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java40
1 files changed, 15 insertions, 25 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
index 1c7d41232..5f1fdc3c7 100644
--- a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
@@ -33,7 +33,6 @@ import de.pixart.messenger.R;
import de.pixart.messenger.persistance.FileBackend;
import de.pixart.messenger.services.XmppConnectionService;
import de.pixart.messenger.utils.ExifHelper;
-import pl.droidsonroids.gif.GifDrawable;
import uk.co.senab.photoview.PhotoView;
import uk.co.senab.photoview.PhotoViewAttacher;
@@ -143,7 +142,6 @@ public class ShowFullscreenMessageActivity extends Activity {
width = options.outWidth;
rotation = getRotation(Uri.parse("file://" + file.getAbsolutePath()));
Log.d(Config.LOGTAG, "Image height: " + height + ", width: " + width + ", rotation: " + rotation);
- mImage.setVisibility(View.VISIBLE);
if (width > height) {
if (rotation == 0 || rotation == 180) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
@@ -173,29 +171,21 @@ public class ShowFullscreenMessageActivity extends Activity {
}
}
}
- if (getMimeType(file.toString()) != null && getMimeType(file.toString()).endsWith("/gif")) {
- try {
- GifDrawable gifDrawable = new GifDrawable(file);
- mImage.setImageDrawable(gifDrawable);
- } catch (IOException e) {
- e.printStackTrace();
- }
- } else {
- final PhotoViewAttacher mAttacher = new PhotoViewAttacher(mImage);
- try {
- Glide.with(this)
- .load(file)
- .asBitmap()
- .into(new BitmapImageViewTarget(mImage) {
- @Override
- public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
- super.onResourceReady(resource, glideAnimation);
- mAttacher.update();
- }
- });
- } catch (Exception e) {
- e.printStackTrace();
- }
+ final PhotoViewAttacher mAttacher = new PhotoViewAttacher(mImage);
+ mImage.setVisibility(View.VISIBLE);
+ try {
+ Glide.with(this)
+ .load(file)
+ .asBitmap()
+ .into(new BitmapImageViewTarget(mImage) {
+ @Override
+ public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
+ super.onResourceReady(resource, glideAnimation);
+ mAttacher.update();
+ }
+ });
+ } catch (Exception e) {
+ e.printStackTrace();
}
}