aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-09-13 14:10:43 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-09-13 14:10:43 +0000
commitaa673436ab4fb13a810b6cdc4624f830c529d704 (patch)
tree7f5f944e670ce0d1d2a0a1bb023517eda5ea84cb /app/src/main/res
parent05e3889fe7eb9c01bd050da1da9d9e7f24f0945e (diff)
downloadinfinity-for-reddit-aa673436ab4fb13a810b6cdc4624f830c529d704.tar
infinity-for-reddit-aa673436ab4fb13a810b6cdc4624f830c529d704.tar.gz
infinity-for-reddit-aa673436ab4fb13a810b6cdc4624f830c529d704.tar.bz2
infinity-for-reddit-aa673436ab4fb13a810b6cdc4624f830c529d704.tar.lz
infinity-for-reddit-aa673436ab4fb13a810b6cdc4624f830c529d704.tar.xz
infinity-for-reddit-aa673436ab4fb13a810b6cdc4624f830c529d704.tar.zst
infinity-for-reddit-aa673436ab4fb13a810b6cdc4624f830c529d704.zip
Gfycat and Redgifs videos autoplay in CommentAndPostRecyclerViewAdapter is available. Show an error icon when loading gfycats and redgifs videos failed in PostRecyclerViewAdapter and CommentAndPostRecyclerViewAdapter.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_error_white_36dp.xml9
-rw-r--r--app/src/main/res/layout/item_post_detail_video_autoplay.xml10
-rw-r--r--app/src/main/res/layout/item_post_video_type_autoplay.xml10
3 files changed, 29 insertions, 0 deletions
diff --git a/app/src/main/res/drawable/ic_error_white_36dp.xml b/app/src/main/res/drawable/ic_error_white_36dp.xml
new file mode 100644
index 00000000..c4705c5d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_error_white_36dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="36dp"
+ android:height="36dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay.xml b/app/src/main/res/layout/item_post_detail_video_autoplay.xml
index 6f3183b7..79e32dd7 100644
--- a/app/src/main/res/layout/item_post_detail_video_autoplay.xml
+++ b/app/src/main/res/layout/item_post_detail_video_autoplay.xml
@@ -214,6 +214,16 @@
android:scaleType="fitStart"
android:visibility="gone" />
+ <ImageView
+ android:id="@+id/error_loading_gfycat_image_view_item_post_detail_video_autoplay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:layout_gravity="center"
+ android:background="@drawable/play_button_round_background"
+ android:src="@drawable/ic_error_white_36dp"
+ android:visibility="gone" />
+
</com.google.android.exoplayer2.ui.AspectRatioFrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
diff --git a/app/src/main/res/layout/item_post_video_type_autoplay.xml b/app/src/main/res/layout/item_post_video_type_autoplay.xml
index dd404645..b68c9231 100644
--- a/app/src/main/res/layout/item_post_video_type_autoplay.xml
+++ b/app/src/main/res/layout/item_post_video_type_autoplay.xml
@@ -217,6 +217,16 @@
android:scaleType="fitStart"
android:visibility="gone" />
+ <ImageView
+ android:id="@+id/error_loading_gfycat_image_view_item_post_video_type_autoplay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:layout_gravity="center"
+ android:background="@drawable/play_button_round_background"
+ android:src="@drawable/ic_error_white_36dp"
+ android:visibility="gone" />
+
</com.google.android.exoplayer2.ui.AspectRatioFrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout