From 033c8bd24184258904f68bee13b96b6c491fec05 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 29 Apr 2020 18:13:28 +0800 Subject: Buggy video and Gif autoplay. --- .../layout/exo_autoplay_playback_control_view.xml | 70 +++++ app/src/main/res/layout/fragment_post.xml | 8 +- app/src/main/res/layout/item_post_gif_type.xml | 314 ++++++++++++++++++++ app/src/main/res/layout/item_post_image_type.xml | 314 ++++++++++++++++++++ app/src/main/res/layout/item_post_link_type.xml | 324 +++++++++++++++++++++ .../res/layout/item_post_no_preview_link_type.xml | 293 +++++++++++++++++++ app/src/main/res/layout/item_post_text_type.xml | 288 ++++++++++++++++++ .../res/layout/item_post_video_type_autoplay.xml | 289 ++++++++++++++++++ 8 files changed, 1899 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/layout/exo_autoplay_playback_control_view.xml create mode 100644 app/src/main/res/layout/item_post_gif_type.xml create mode 100644 app/src/main/res/layout/item_post_image_type.xml create 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_type.xml create mode 100644 app/src/main/res/layout/item_post_text_type.xml create mode 100644 app/src/main/res/layout/item_post_video_type_autoplay.xml (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml new file mode 100644 index 00000000..99cab8e2 --- /dev/null +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_post.xml b/app/src/main/res/layout/fragment_post.xml index 7862ba25..dc3248b5 100644 --- a/app/src/main/res/layout/fragment_post.xml +++ b/app/src/main/res/layout/fragment_post.xml @@ -10,7 +10,13 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_image_type.xml b/app/src/main/res/layout/item_post_image_type.xml new file mode 100644 index 00000000..6ca140d3 --- /dev/null +++ b/app/src/main/res/layout/item_post_image_type.xml @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 new file mode 100644 index 00000000..43f51b10 --- /dev/null +++ b/app/src/main/res/layout/item_post_link_type.xml @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 new file mode 100644 index 00000000..a6ef9eeb --- /dev/null +++ b/app/src/main/res/layout/item_post_no_preview_link_type.xml @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 new file mode 100644 index 00000000..cc7a3bb9 --- /dev/null +++ b/app/src/main/res/layout/item_post_text_type.xml @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 new file mode 100644 index 00000000..2f1c078a --- /dev/null +++ b/app/src/main/res/layout/item_post_video_type_autoplay.xml @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3 From 5c053501192e0d9da87d7823c910e79d01cddafc Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 30 Apr 2020 11:24:34 +0800 Subject: Move onClickListeners to ViewHolders in PostRecyclerViewAdapter. Pause video after fragment pause. --- app/src/main/res/layout/activity_view_gif.xml | 3 ++- app/src/main/res/layout/activity_view_video.xml | 2 +- app/src/main/res/layout/fragment_post.xml | 2 +- app/src/main/res/layout/item_post_video_type_autoplay.xml | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/activity_view_gif.xml b/app/src/main/res/layout/activity_view_gif.xml index 8740679c..cce51370 100644 --- a/app/src/main/res/layout/activity_view_gif.xml +++ b/app/src/main/res/layout/activity_view_gif.xml @@ -5,7 +5,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/parent_relative_layout_view_gif_activity" - android:background="@android:color/black" + android:background="#000000" + android:keepScreenOn="true" tools:application="ml.docilealligator.infinityforreddit.Activity.ViewGIFActivity"> diff --git a/app/src/main/res/layout/fragment_post.xml b/app/src/main/res/layout/fragment_post.xml index dc3248b5..69652bbc 100644 --- a/app/src/main/res/layout/fragment_post.xml +++ b/app/src/main/res/layout/fragment_post.xml @@ -16,7 +16,7 @@ android:layout_height="match_parent" android:clipToPadding="false" />--> - Date: Thu, 30 Apr 2020 15:29:56 +0800 Subject: Add an option for video autoplay. Rewrite some viewholders in PostRecyclerViewAdapter. --- .../layout/exo_autoplay_playback_control_view.xml | 2 - app/src/main/res/layout/fragment_post.xml | 6 - app/src/main/res/layout/item_post_gif_type.xml | 314 -------------------- .../item_post_image_and_gif_autoplay_type.xml | 313 ++++++++++++++++++++ app/src/main/res/layout/item_post_image_type.xml | 314 -------------------- .../item_post_video_and_gif_preview_type.xml | 328 +++++++++++++++++++++ 6 files changed, 641 insertions(+), 636 deletions(-) delete mode 100644 app/src/main/res/layout/item_post_gif_type.xml create mode 100644 app/src/main/res/layout/item_post_image_and_gif_autoplay_type.xml delete mode 100644 app/src/main/res/layout/item_post_image_type.xml create 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/exo_autoplay_playback_control_view.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml index 99cab8e2..1adc685e 100644 --- a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml @@ -7,8 +7,6 @@ android:gravity="bottom" android:paddingStart="16dp" android:paddingEnd="16dp" - android:paddingBottom="16dp" - android:background="@color/transparentActionBarAndExoPlayerControllerColor" android:orientation="vertical"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ 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 new file mode 100644 index 00000000..b2fdf016 --- /dev/null +++ b/app/src/main/res/layout/item_post_image_and_gif_autoplay_type.xml @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_post_image_type.xml b/app/src/main/res/layout/item_post_image_type.xml deleted file mode 100644 index 6ca140d3..00000000 --- a/app/src/main/res/layout/item_post_image_type.xml +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ 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 new file mode 100644 index 00000000..c3549df4 --- /dev/null +++ b/app/src/main/res/layout/item_post_video_and_gif_preview_type.xml @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3 From 25328e5d18455a5817b39702a7cb389f29037380 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Fri, 1 May 2020 10:50:40 +0800 Subject: Muting and unmuting audio when autoplaying are available. --- app/src/main/res/layout/exo_autoplay_playback_control_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml index 1adc685e..b12deafe 100644 --- a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml @@ -26,7 +26,9 @@ + android:src="@drawable/ic_mute_24dp" + android:layout_alignParentEnd="true" + android:visibility="gone" /> -- cgit v1.2.3 From 911901cf757811c13739732cd58cc258585765aa Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Fri, 1 May 2020 22:07:13 +0800 Subject: Beautify player control view for video autoplay. --- .../layout/exo_autoplay_playback_control_view.xml | 108 ++++++++++----------- 1 file changed, 51 insertions(+), 57 deletions(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml index b12deafe..826f6870 100644 --- a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml @@ -1,70 +1,64 @@ - + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:layout_gravity="bottom"> - + android:layout_alignParentStart="true" + android:layout_centerVertical="true" + android:includeFontPadding="false" + android:textColor="#FFFFFF" + android:textSize="12sp" + android:textStyle="bold" /> - - - - - - - - - + android:layout_toEndOf="@id/exo_position" + android:layout_centerVertical="true" + android:text="/" + android:textColor="#FFFFFF" + android:textSize="12sp" + android:textStyle="bold" /> - + - + - + - + - \ No newline at end of file + \ No newline at end of file -- cgit v1.2.3 From 45cdc6d3a61ad15eeed5e9f70f4c8f36f7a22230 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 3 May 2020 09:16:07 +0800 Subject: Show cakeday of users and subreddits, user description and post and comment karma. --- .../res/layout/activity_view_subreddit_detail.xml | 47 ++++++++++++++++++---- .../main/res/layout/activity_view_user_detail.xml | 42 ++++++++++++++----- 2 files changed, 71 insertions(+), 18 deletions(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml index da17e978..ee3f0357 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -74,7 +74,7 @@ android:textColor="@android:color/white" android:layout_gravity="center_horizontal"/> - + app:layout_constraintBottom_toTopOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toStartOf="@id/barrier" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintHorizontal_bias="0" /> + android:textSize="?attr/font_default" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toStartOf="@id/barrier" + app:layout_constraintTop_toBottomOf="@id/subscriber_count_text_view_view_subreddit_detail_activity" + app:layout_constraintHorizontal_bias="0" /> + + + + + + - + - - + + + + + + + + + + -- cgit v1.2.3 From 9d451d65dd13c07286641e3fca69914e098a5eb0 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 3 May 2020 16:47:33 +0800 Subject: Prepare to add report feature. --- app/src/main/res/layout/activity_report.xml | 31 ++++++++++++++++++++++ .../layout/exo_autoplay_playback_control_view.xml | 10 ++++++- app/src/main/res/layout/item_report_reason.xml | 29 ++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/layout/activity_report.xml create mode 100644 app/src/main/res/layout/item_report_reason.xml (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/activity_report.xml b/app/src/main/res/layout/activity_report.xml new file mode 100644 index 00000000..845c9ecc --- /dev/null +++ b/app/src/main/res/layout/activity_report.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml index 826f6870..a5e128ae 100644 --- a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml @@ -57,8 +57,16 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="8dp" - android:layout_alignParentEnd="true" + android:layout_toStartOf="@id/fullscreen_exo_playback_control_view" android:src="@drawable/ic_mute_white_rounded_18dp" android:visibility="gone" /> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_report_reason.xml b/app/src/main/res/layout/item_report_reason.xml new file mode 100644 index 00000000..08d6900b --- /dev/null +++ b/app/src/main/res/layout/item_report_reason.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file -- cgit v1.2.3 From d444a3a084d82b65e41e15282c11694e7cde7d7a Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Tue, 5 May 2020 13:48:42 +0800 Subject: Reporting posts is now available. --- app/src/main/res/layout/exo_autoplay_playback_control_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml index a5e128ae..7280717b 100644 --- a/app/src/main/res/layout/exo_autoplay_playback_control_view.xml +++ b/app/src/main/res/layout/exo_autoplay_playback_control_view.xml @@ -3,7 +3,7 @@ android:id="@+id/linear_layout_exo_playback_control_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="8dp" + android:paddingStart="16dp" android:paddingEnd="8dp" android:layout_gravity="bottom"> -- cgit v1.2.3 From 893c8a20769684e2d4493945aa69059e10a5f7e2 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Tue, 5 May 2020 14:30:46 +0800 Subject: Reporting comments is now available. --- .../res/layout/fragment_comment_more_bottom_sheet.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml index d60fe273..ddd3e572 100644 --- a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml @@ -81,6 +81,24 @@ android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> + + \ No newline at end of file -- cgit v1.2.3