From ae49dd50d4b8ccdbc99a142c44e29e63ab111a3a Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 19 Dec 2019 18:32:37 +0800 Subject: Show a play button on the image if the post is a video or an image. --- .../Adapter/CommentAndPostRecyclerViewAdapter.java | 6 +++++ .../Adapter/PostRecyclerViewAdapter.java | 18 ++++++++++++- .../res/drawable-night/ic_play_circle_36dp.xml | 4 +++ app/src/main/res/drawable/ic_play_circle_36dp.xml | 4 +++ .../res/drawable/play_button_round_background.xml | 9 +++++++ app/src/main/res/layout/item_post.xml | 30 +++++++++++++++++----- app/src/main/res/layout/item_post_compact.xml | 28 +++++++++++++++----- app/src/main/res/layout/item_post_detail.xml | 26 +++++++++++++++---- app/src/main/res/values-night/colors.xml | 2 ++ app/src/main/res/values/colors.xml | 2 ++ 10 files changed, 110 insertions(+), 19 deletions(-) create mode 100644 app/src/main/res/drawable-night/ic_play_circle_36dp.xml create mode 100644 app/src/main/res/drawable/ic_play_circle_36dp.xml create mode 100644 app/src/main/res/drawable/play_button_round_background.xml diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java index 6c1c1130..694e0f62 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -466,6 +466,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter + + diff --git a/app/src/main/res/drawable/ic_play_circle_36dp.xml b/app/src/main/res/drawable/ic_play_circle_36dp.xml new file mode 100644 index 00000000..7a21d9a9 --- /dev/null +++ b/app/src/main/res/drawable/ic_play_circle_36dp.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/play_button_round_background.xml b/app/src/main/res/drawable/play_button_round_background.xml new file mode 100644 index 00000000..d047c68d --- /dev/null +++ b/app/src/main/res/drawable/play_button_round_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index 22b94789..787a1fe9 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -231,19 +231,35 @@ android:layout_height="wrap_content" android:visibility="gone"> + + + + + + + + - - + + + + + + + + - - - + android:layout_height="wrap_content"> + + + + + + #1565C0 + #FFFFFF + #242424 #3C3C3C diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index bf8487e6..43811d56 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -22,6 +22,8 @@ @color/colorPrimaryDark + #000000 + #FFFFFF @android:color/black -- cgit v1.2.3