From c7308f67b38e24eebfa031bb0293a68b11cdab39 Mon Sep 17 00:00:00 2001 From: Marcus Birkin Date: Tue, 17 Dec 2019 14:56:09 +0000 Subject: [PATCH 1/4] Landscape GUI changes Make the Volume, mode, and save channel; widgets more usable --- .../main/res/layout-land/activity_player.xml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/layout-land/activity_player.xml b/app/src/main/res/layout-land/activity_player.xml index 8490467..c2fefc7 100644 --- a/app/src/main/res/layout-land/activity_player.xml +++ b/app/src/main/res/layout-land/activity_player.xml @@ -285,8 +285,8 @@ @@ -294,8 +294,12 @@ android:id="@+id/volume_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="5dp" + android:padding="10dp" android:text="11" + android:layout_marginLeft="25dp" + android:layout_marginBottom="5dp" + android:scaleX="3" + android:scaleY="3" android:textAppearance="?android:textAppearanceSmall" app:layout_constraintBottom_toTopOf="@+id/player_controls_top_guideline" app:layout_constraintStart_toEndOf="@+id/volume_button" /> @@ -304,8 +308,12 @@ android:id="@+id/volume_button" android:layout_width="30dp" android:layout_height="30dp" + android:layout_marginLeft="14dp" + android:layout_marginBottom="10dp" android:background="?selectableItemBackgroundBorderless" android:scaleType="fitXY" + android:scaleX="3" + android:scaleY="3" app:layout_constraintBottom_toTopOf="@+id/player_controls_top_guideline" app:layout_constraintStart_toStartOf="@+id/player_and_station_list_separator" app:srcCompat="@drawable/ic_volume_mute_white_24dp" /> @@ -314,6 +322,9 @@ android:id="@+id/mode_switch" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginBottom="10dp" + android:scaleX="3" + android:scaleY="3" android:showText="true" android:textOff="@string/dab" android:textOn="@string/fm" @@ -417,10 +428,9 @@ android:id="@+id/add_channel_fab" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_margin="16dp" + android:layout_marginRight="10dp" android:clickable="true" app:layout_constraintBottom_toTopOf="@+id/player_controls_top_guideline" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="@+id/player_controls_top_guideline" app:srcCompat="@drawable/ic_add_white_24dp" /> From f10900fe576266e23a902c10c2589460b0bdb847 Mon Sep 17 00:00:00 2001 From: Marcus Birkin Date: Tue, 17 Dec 2019 15:11:12 +0000 Subject: [PATCH 2/4] Portrait GUI changes Make the Volume, mode, and save channel; widgets more usable --- app/src/main/res/layout/activity_player.xml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/activity_player.xml b/app/src/main/res/layout/activity_player.xml index 8e0d59f..3890199 100644 --- a/app/src/main/res/layout/activity_player.xml +++ b/app/src/main/res/layout/activity_player.xml @@ -294,8 +294,12 @@ android:id="@+id/volume_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="5dp" + android:padding="10dp" android:text="11" + android:layout_marginLeft="15dp" + android:layout_marginBottom="5dp" + android:scaleX="2" + android:scaleY="2" android:textAppearance="?android:textAppearanceSmall" app:layout_constraintBottom_toTopOf="@+id/player_controls_top_guideline" app:layout_constraintStart_toEndOf="@+id/volume_button" /> @@ -304,16 +308,23 @@ android:id="@+id/volume_button" android:layout_width="30dp" android:layout_height="30dp" + android:layout_marginLeft="10dp" + android:layout_marginBottom="10dp" android:background="?selectableItemBackgroundBorderless" android:scaleType="fitXY" + android:scaleX="2" + android:scaleY="2" app:layout_constraintBottom_toTopOf="@+id/player_controls_top_guideline" - app:layout_constraintStart_toStartOf="@+id/player_and_station_list_separator" + app:layout_constraintStart_toStartOf="parent" app:srcCompat="@drawable/ic_volume_mute_white_24dp" /> \ No newline at end of file From 95d6a831c69f3f95aafa285fccbe76d913e9459c Mon Sep 17 00:00:00 2001 From: Marcus Birkin Date: Tue, 17 Dec 2019 19:59:06 +0000 Subject: [PATCH 3/4] Landscape Scaling improvements Scale drawables down, and not up --- .../keystoneradio/ui/PlayerActivity.java | 10 ++-- ..._white_24dp.xml => ic_add_white_100dp.xml} | 4 +- ...4dp.xml => ic_volume_down_white_100dp.xml} | 4 +- ...4dp.xml => ic_volume_mute_white_100dp.xml} | 4 +- ..._24dp.xml => ic_volume_up_white_100dp.xml} | 4 +- .../main/res/layout-land/activity_player.xml | 50 ++++++++++--------- 6 files changed, 40 insertions(+), 36 deletions(-) rename app/src/main/res/drawable/{ic_add_white_24dp.xml => ic_add_white_100dp.xml} (81%) rename app/src/main/res/drawable/{ic_volume_down_white_24dp.xml => ic_volume_down_white_100dp.xml} (84%) rename app/src/main/res/drawable/{ic_volume_mute_white_24dp.xml => ic_volume_mute_white_100dp.xml} (80%) rename app/src/main/res/drawable/{ic_volume_up_white_24dp.xml => ic_volume_up_white_100dp.xml} (87%) diff --git a/app/src/main/java/com/freshollie/monkeyboard/keystoneradio/ui/PlayerActivity.java b/app/src/main/java/com/freshollie/monkeyboard/keystoneradio/ui/PlayerActivity.java index 91ff748..5545d50 100644 --- a/app/src/main/java/com/freshollie/monkeyboard/keystoneradio/ui/PlayerActivity.java +++ b/app/src/main/java/com/freshollie/monkeyboard/keystoneradio/ui/PlayerActivity.java @@ -716,11 +716,11 @@ public void updateVolumeIcon(int volume) { // At full volume if (volume > 8) { - icon = R.drawable.ic_volume_up_white_24dp; + icon = R.drawable.ic_volume_up_white_100dp; } else if (volume > 0) { - icon = R.drawable.ic_volume_down_white_24dp; + icon = R.drawable.ic_volume_down_white_100dp; } else { - icon = R.drawable.ic_volume_mute_white_24dp; + icon = R.drawable.ic_volume_mute_white_100dp; } volumeButton.setImageResource(icon); @@ -1104,10 +1104,10 @@ public void onRadioVolumeChanged(int volume) { if (playerService.isDucked() && playerService.isPlaying()) { // Ducking if (volume == 0) { // Full duck - icon = R.drawable.ic_volume_mute_white_24dp; + icon = R.drawable.ic_volume_mute_white_100dp; } else { // Duck - icon = R.drawable.ic_volume_down_white_24dp; + icon = R.drawable.ic_volume_down_white_100dp; } } } diff --git a/app/src/main/res/drawable/ic_add_white_24dp.xml b/app/src/main/res/drawable/ic_add_white_100dp.xml similarity index 81% rename from app/src/main/res/drawable/ic_add_white_24dp.xml rename to app/src/main/res/drawable/ic_add_white_100dp.xml index b9b8eca..0e6627d 100644 --- a/app/src/main/res/drawable/ic_add_white_24dp.xml +++ b/app/src/main/res/drawable/ic_add_white_100dp.xml @@ -1,6 +1,6 @@ + app:layout_constraintStart_toEndOf="@+id/volume_button" + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline"/> + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline" + app:srcCompat="@drawable/ic_volume_mute_white_100dp" /> + app:layout_constraintStart_toStartOf="@+id/player_and_station_list_separator" + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline"/> + app:layout_constraintGuide_percent="0.75" /> + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline" + app:srcCompat="@drawable/ic_add_white_100dp" /> + + From 3aed25cdcabaf6aa0024d54caf10511846695d3a Mon Sep 17 00:00:00 2001 From: Marcus Birkin Date: Tue, 17 Dec 2019 20:12:53 +0000 Subject: [PATCH 4/4] Portrait Scaling improvements Scale drawables down, and not up --- app/src/main/res/layout/activity_player.xml | 50 +++++++++++---------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/app/src/main/res/layout/activity_player.xml b/app/src/main/res/layout/activity_player.xml index 3890199..ac0dda8 100644 --- a/app/src/main/res/layout/activity_player.xml +++ b/app/src/main/res/layout/activity_player.xml @@ -39,7 +39,7 @@ android:layout_width="0dp" android:layout_height="0dp" android:orientation="horizontal" - app:layout_constraintGuide_percent="0.66" /> + app:layout_constraintGuide_percent="0.70" /> + app:layout_constraintStart_toEndOf="@+id/volume_button" + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline"/> + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline" + app:srcCompat="@drawable/ic_volume_mute_white_100dp" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline"/> + app:layout_constraintGuide_percent="0.55" /> + app:layout_constraintTop_toTopOf="@+id/volume_controls_top_guideline" + app:srcCompat="@drawable/ic_add_white_100dp" /> + + \ No newline at end of file