From a0879821abae2e684b6fcc3df74128c6b0e53188 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Tue, 20 Jul 2021 20:55:23 +0800 Subject: Tweak the autoplay video control. --- .../adapters/PostDetailRecyclerViewAdapter.java | 8 +- .../adapters/PostRecyclerViewAdapter.java | 16 +- app/src/main/res/drawable/background_autoplay.xml | 11 -- .../drawable/ic_fullscreen_white_rounded_18dp.xml | 9 -- .../drawable/ic_fullscreen_white_rounded_24dp.xml | 9 ++ .../res/drawable/ic_mute_white_rounded_18dp.xml | 9 -- .../res/drawable/ic_mute_white_rounded_24dp.xml | 9 ++ .../res/drawable/ic_pause_white_rounded_18dp.xml | 9 -- .../res/drawable/ic_pause_white_rounded_24dp.xml | 9 ++ .../drawable/ic_play_arrow_white_rounded_18dp.xml | 9 -- .../drawable/ic_play_arrow_white_rounded_24dp.xml | 9 ++ .../res/drawable/ic_unmute_white_rounded_18dp.xml | 9 -- .../res/drawable/ic_unmute_white_rounded_24dp.xml | 9 ++ .../layout/exo_autoplay_playback_control_view.xml | 161 +++++++++++---------- 14 files changed, 144 insertions(+), 142 deletions(-) delete mode 100644 app/src/main/res/drawable/background_autoplay.xml delete mode 100644 app/src/main/res/drawable/ic_fullscreen_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_fullscreen_white_rounded_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_mute_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_pause_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_pause_white_rounded_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_play_arrow_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_play_arrow_white_rounded_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_unmute_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java index 43f6fcbe..2f749083 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -1615,11 +1615,11 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter { if (helper != null) { if (helper.getVolume() != 0) { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_white_rounded_18dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_white_rounded_24dp)); helper.setVolume(0f); volume = 0f; } else { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_white_rounded_18dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_white_rounded_24dp)); helper.setVolume(1f); volume = 1f; } @@ -1701,9 +1701,9 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter { if (helper != null) { if (helper.getVolume() != 0) { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_white_rounded_18dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_white_rounded_24dp)); helper.setVolume(0f); volume = 0f; mFragment.videoAutoplayChangeMutingOption(true); } else { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_white_rounded_18dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_white_rounded_24dp)); helper.setVolume(1f); volume = 1f; mFragment.videoAutoplayChangeMutingOption(false); @@ -2918,9 +2918,9 @@ public class PostRecyclerViewAdapter extends PagedListAdapter { if (helper != null) { if (helper.getVolume() != 0) { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_white_rounded_18dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_white_rounded_24dp)); helper.setVolume(0f); volume = 0f; mFragment.videoAutoplayChangeMutingOption(true); } else { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_white_rounded_18dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_white_rounded_24dp)); helper.setVolume(1f); volume = 1f; mFragment.videoAutoplayChangeMutingOption(false); @@ -4137,9 +4137,9 @@ public class PostRecyclerViewAdapter extends PagedListAdapter - - - - - - - diff --git a/app/src/main/res/drawable/ic_fullscreen_white_rounded_18dp.xml b/app/src/main/res/drawable/ic_fullscreen_white_rounded_18dp.xml deleted file mode 100644 index 9977b60f..00000000 --- a/app/src/main/res/drawable/ic_fullscreen_white_rounded_18dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_fullscreen_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_fullscreen_white_rounded_24dp.xml new file mode 100644 index 00000000..0dbedfee --- /dev/null +++ b/app/src/main/res/drawable/ic_fullscreen_white_rounded_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_mute_white_rounded_18dp.xml b/app/src/main/res/drawable/ic_mute_white_rounded_18dp.xml deleted file mode 100644 index b4f8f660..00000000 --- a/app/src/main/res/drawable/ic_mute_white_rounded_18dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml new file mode 100644 index 00000000..bc45d400 --- /dev/null +++ b/app/src/main/res/drawable/ic_mute_white_rounded_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_pause_white_rounded_18dp.xml b/app/src/main/res/drawable/ic_pause_white_rounded_18dp.xml deleted file mode 100644 index 479c57b0..00000000 --- a/app/src/main/res/drawable/ic_pause_white_rounded_18dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_pause_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_pause_white_rounded_24dp.xml new file mode 100644 index 00000000..a5e498b5 --- /dev/null +++ b/app/src/main/res/drawable/ic_pause_white_rounded_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_play_arrow_white_rounded_18dp.xml b/app/src/main/res/drawable/ic_play_arrow_white_rounded_18dp.xml deleted file mode 100644 index 3400b3ac..00000000 --- a/app/src/main/res/drawable/ic_play_arrow_white_rounded_18dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_play_arrow_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_play_arrow_white_rounded_24dp.xml new file mode 100644 index 00000000..78fbfbba --- /dev/null +++ b/app/src/main/res/drawable/ic_play_arrow_white_rounded_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_unmute_white_rounded_18dp.xml b/app/src/main/res/drawable/ic_unmute_white_rounded_18dp.xml deleted file mode 100644 index 90b8f85d..00000000 --- a/app/src/main/res/drawable/ic_unmute_white_rounded_18dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml b/app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml new file mode 100644 index 00000000..3afb6532 --- /dev/null +++ b/app/src/main/res/drawable/ic_unmute_white_rounded_24dp.xml @@ -0,0 +1,9 @@ + + + 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 438d0172..50fa5421 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,92 +1,105 @@ - + android:background="#80000000"> - - - - - - - + - + - + - + - + - + - \ No newline at end of file + \ No newline at end of file -- cgit v1.2.3