use a simple ImageView at photo fragments

This commit is contained in:
tibbi 2017-10-28 12:56:57 +02:00
parent 286955ab83
commit 1c3aab82ff
2 changed files with 3 additions and 2 deletions

View file

@ -156,8 +156,9 @@ class PhotoFragment : ViewPagerFragment() {
private fun loadImage() { private fun loadImage() {
if (medium.isGif()) { if (medium.isGif()) {
gifDrawable = GifDrawable(medium.path) gifDrawable = GifDrawable(medium.path)
if (!isFragmentVisible) if (!isFragmentVisible) {
gifDrawable!!.stop() gifDrawable!!.stop()
}
view.gif_view.setImageDrawable(gifDrawable) view.gif_view.setImageDrawable(gifDrawable)
} else { } else {

View file

@ -6,7 +6,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<pl.droidsonroids.gif.GifImageView <ImageView
android:id="@+id/gif_view" android:id="@+id/gif_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>