Use GifImageView to display all the images in order to prevent slow playing of the gifs. Extend GifImageView as AspectRatioGifImageView to retain the features of AspectRatioImageView.

This commit is contained in:
Alex Ning
2018-12-22 10:42:24 +08:00
parent 33db4809e4
commit 60b659e651
11 changed files with 234 additions and 41 deletions

View File

@@ -31,8 +31,8 @@
android:scaleType="centerCrop"
android:layout_height="180dp" />
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/icon_circle_image_view_view_subreddit_detail_activity"
<com.felipecsl.gifimageview.library.GifImageView
android:id="@+id/icon_gif_image_view_view_subreddit_detail_activity"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginTop="-36dp"

View File

@@ -20,8 +20,8 @@
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/subreddit_icon_circle_image_view_best_post_item"
<CustomView.AspectRatioGifImageView
android:id="@+id/subreddit_icon_gif_image_view_best_post_item"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentStart="true"
@@ -34,7 +34,7 @@
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:layout_toStartOf="@id/stickied_post_image_view_best_post_item"
android:layout_toEndOf="@id/subreddit_icon_circle_image_view_best_post_item"
android:layout_toEndOf="@id/subreddit_icon_gif_image_view_best_post_item"
android:layout_centerVertical="true"
android:textColor="#E91E63"/>
@@ -148,7 +148,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<com.santalu.aspectratioimageview.AspectRatioImageView
<CustomView.AspectRatioGifImageView
android:id="@+id/image_view_best_post_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -7,8 +7,8 @@
android:focusable="true"
android:background="?attr/selectableItemBackground">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/subreddit_icon_circle_image_view_item_subscribed_subreddit"
<com.felipecsl.gifimageview.library.GifImageView
android:id="@+id/subreddit_icon_gif_image_view_item_subscribed_subreddit"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"