From e439b840957030cdce7b310b595cfa9add844422 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 7 May 2020 14:05:33 +0800 Subject: Video autoplay in ViewPostDetailActivity. Optimize CommentAndPostRecyclerViewAdapter. --- .../main/res/layout/activity_view_post_detail.xml | 2 +- app/src/main/res/layout/item_post.xml | 361 -------------------- app/src/main/res/layout/item_post_compact.xml | 8 +- app/src/main/res/layout/item_post_detail.xml | 362 --------------------- .../item_post_detail_image_and_gif_autoplay.xml | 317 ++++++++++++++++++ app/src/main/res/layout/item_post_detail_link.xml | 327 +++++++++++++++++++ .../layout/item_post_detail_no_preview_link.xml | 305 +++++++++++++++++ app/src/main/res/layout/item_post_detail_text.xml | 288 ++++++++++++++++ .../item_post_detail_video_and_gif_preview.xml | 330 +++++++++++++++++++ .../res/layout/item_post_detail_video_autoplay.xml | 294 +++++++++++++++++ .../layout/item_post_image_and_gif_autoplay.xml | 313 ++++++++++++++++++ .../item_post_image_and_gif_autoplay_type.xml | 313 ------------------ app/src/main/res/layout/item_post_link.xml | 324 ++++++++++++++++++ app/src/main/res/layout/item_post_link_type.xml | 324 ------------------ .../main/res/layout/item_post_no_preview_link.xml | 293 +++++++++++++++++ .../res/layout/item_post_no_preview_link_type.xml | 293 ----------------- app/src/main/res/layout/item_post_text.xml | 288 ++++++++++++++++ app/src/main/res/layout/item_post_text_type.xml | 288 ---------------- .../res/layout/item_post_video_and_gif_preview.xml | 328 +++++++++++++++++++ .../item_post_video_and_gif_preview_type.xml | 328 ------------------- .../res/layout/item_post_video_type_autoplay.xml | 6 +- 21 files changed, 3415 insertions(+), 2277 deletions(-) delete mode 100644 app/src/main/res/layout/item_post.xml delete mode 100644 app/src/main/res/layout/item_post_detail.xml create mode 100644 app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml create mode 100644 app/src/main/res/layout/item_post_detail_link.xml create mode 100644 app/src/main/res/layout/item_post_detail_no_preview_link.xml create mode 100644 app/src/main/res/layout/item_post_detail_text.xml create mode 100644 app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml create mode 100644 app/src/main/res/layout/item_post_detail_video_autoplay.xml create mode 100644 app/src/main/res/layout/item_post_image_and_gif_autoplay.xml delete mode 100644 app/src/main/res/layout/item_post_image_and_gif_autoplay_type.xml create mode 100644 app/src/main/res/layout/item_post_link.xml delete mode 100644 app/src/main/res/layout/item_post_link_type.xml create mode 100644 app/src/main/res/layout/item_post_no_preview_link.xml delete mode 100644 app/src/main/res/layout/item_post_no_preview_link_type.xml create mode 100644 app/src/main/res/layout/item_post_text.xml delete mode 100644 app/src/main/res/layout/item_post_text_type.xml create mode 100644 app/src/main/res/layout/item_post_video_and_gif_preview.xml delete mode 100644 app/src/main/res/layout/item_post_video_and_gif_preview_type.xml (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml index 3b0dd281..d867c596 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -37,7 +37,7 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_compact.xml b/app/src/main/res/layout/item_post_compact.xml index 8b65f934..d81a2bdc 100644 --- a/app/src/main/res/layout/item_post_compact.xml +++ b/app/src/main/res/layout/item_post_compact.xml @@ -54,7 +54,7 @@ app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml deleted file mode 100644 index ce515feb..00000000 --- a/app/src/main/res/layout/item_post_detail.xml +++ /dev/null @@ -1,362 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml new file mode 100644 index 00000000..3667d7b5 --- /dev/null +++ b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_detail_link.xml b/app/src/main/res/layout/item_post_detail_link.xml new file mode 100644 index 00000000..1b8570da --- /dev/null +++ b/app/src/main/res/layout/item_post_detail_link.xml @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_detail_no_preview_link.xml b/app/src/main/res/layout/item_post_detail_no_preview_link.xml new file mode 100644 index 00000000..01e887fb --- /dev/null +++ b/app/src/main/res/layout/item_post_detail_no_preview_link.xml @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_detail_text.xml b/app/src/main/res/layout/item_post_detail_text.xml new file mode 100644 index 00000000..00b81547 --- /dev/null +++ b/app/src/main/res/layout/item_post_detail_text.xml @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml new file mode 100644 index 00000000..5de14a3e --- /dev/null +++ b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file 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 new file mode 100644 index 00000000..b73fae27 --- /dev/null +++ b/app/src/main/res/layout/item_post_detail_video_autoplay.xml @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_image_and_gif_autoplay.xml b/app/src/main/res/layout/item_post_image_and_gif_autoplay.xml new file mode 100644 index 00000000..e29f4287 --- /dev/null +++ b/app/src/main/res/layout/item_post_image_and_gif_autoplay.xml @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_image_and_gif_autoplay_type.xml b/app/src/main/res/layout/item_post_image_and_gif_autoplay_type.xml deleted file mode 100644 index b2fdf016..00000000 --- a/app/src/main/res/layout/item_post_image_and_gif_autoplay_type.xml +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_link.xml b/app/src/main/res/layout/item_post_link.xml new file mode 100644 index 00000000..66c55908 --- /dev/null +++ b/app/src/main/res/layout/item_post_link.xml @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_link_type.xml b/app/src/main/res/layout/item_post_link_type.xml deleted file mode 100644 index 43f51b10..00000000 --- a/app/src/main/res/layout/item_post_link_type.xml +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_no_preview_link.xml b/app/src/main/res/layout/item_post_no_preview_link.xml new file mode 100644 index 00000000..bf1ba331 --- /dev/null +++ b/app/src/main/res/layout/item_post_no_preview_link.xml @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_no_preview_link_type.xml b/app/src/main/res/layout/item_post_no_preview_link_type.xml deleted file mode 100644 index a6ef9eeb..00000000 --- a/app/src/main/res/layout/item_post_no_preview_link_type.xml +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_text.xml b/app/src/main/res/layout/item_post_text.xml new file mode 100644 index 00000000..39ea56f4 --- /dev/null +++ b/app/src/main/res/layout/item_post_text.xml @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_text_type.xml b/app/src/main/res/layout/item_post_text_type.xml deleted file mode 100644 index cc7a3bb9..00000000 --- a/app/src/main/res/layout/item_post_text_type.xml +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_video_and_gif_preview.xml b/app/src/main/res/layout/item_post_video_and_gif_preview.xml new file mode 100644 index 00000000..ad2e3b9d --- /dev/null +++ b/app/src/main/res/layout/item_post_video_and_gif_preview.xml @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_video_and_gif_preview_type.xml b/app/src/main/res/layout/item_post_video_and_gif_preview_type.xml deleted file mode 100644 index c3549df4..00000000 --- a/app/src/main/res/layout/item_post_video_and_gif_preview_type.xml +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file 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 138090d8..bfbc7456 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 @@ -69,7 +69,7 @@ app:layout_constraintTop_toTopOf="parent"/>