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. --- .../Adapter/PostRecyclerViewAdapter.java | 10 +- .../res/drawable/ic_mute_white_rounded_18dp.xml | 9 ++ .../res/drawable/ic_pause_white_rounded_18dp.xml | 9 ++ .../drawable/ic_play_arrow_white_rounded_18dp.xml | 9 ++ .../res/drawable/ic_unmute_white_rounded_18dp.xml | 9 ++ .../layout/exo_autoplay_playback_control_view.xml | 108 ++++++++++----------- 6 files changed, 92 insertions(+), 62 deletions(-) create mode 100644 app/src/main/res/drawable/ic_mute_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_pause_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_play_arrow_white_rounded_18dp.xml create mode 100644 app/src/main/res/drawable/ic_unmute_white_rounded_18dp.xml (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index 26a2522c..c474a710 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -1848,7 +1848,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter { if (helper != null) { if (helper.getVolume() != 0) { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_24dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_mute_white_rounded_18dp)); helper.setVolume(0f); volume = 0f; } else { - muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_24dp)); + muteButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_unmute_white_rounded_18dp)); helper.setVolume(1f); volume = 1f; } @@ -1942,9 +1942,9 @@ public class PostRecyclerViewAdapter extends PagedListAdapter + + 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 new file mode 100644 index 00000000..479c57b0 --- /dev/null +++ b/app/src/main/res/drawable/ic_pause_white_rounded_18dp.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 new file mode 100644 index 00000000..3400b3ac --- /dev/null +++ b/app/src/main/res/drawable/ic_play_arrow_white_rounded_18dp.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 new file mode 100644 index 00000000..90b8f85d --- /dev/null +++ b/app/src/main/res/drawable/ic_unmute_white_rounded_18dp.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 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