From b3804e4c65e5d2f787037c43cbc3ae813f698ef7 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Mon, 24 Jun 2019 11:46:51 +0200 Subject: [PATCH 1/2] Fixes radio button hover state wip --- app/src/main/res/drawable/radio.xml | 20 +++++++----- app/src/main/res/drawable/radio_black.xml | 18 +++++++++++ app/src/main/res/drawable/radio_hover.xml | 18 +++++++++++ app/src/main/res/drawable/radio_off.xml | 26 +-------------- app/src/main/res/drawable/radio_on.xml | 32 +------------------ .../main/res/layout/setting_radio_item.xml | 2 +- 6 files changed, 51 insertions(+), 65 deletions(-) create mode 100644 app/src/main/res/drawable/radio_black.xml create mode 100644 app/src/main/res/drawable/radio_hover.xml diff --git a/app/src/main/res/drawable/radio.xml b/app/src/main/res/drawable/radio.xml index 730df15f3..8570bf0b2 100644 --- a/app/src/main/res/drawable/radio.xml +++ b/app/src/main/res/drawable/radio.xml @@ -1,15 +1,19 @@ + android:drawable="@drawable/radio_off" + android:state_checked="true" + android:state_pressed="true" /> + android:drawable="@drawable/radio_black" + android:state_checked="false" + android:state_pressed="true" /> + android:drawable="@drawable/radio_hover" + android:state_hovered="true" /> + android:drawable="@drawable/radio_on" + android:state_checked="true" /> + \ No newline at end of file diff --git a/app/src/main/res/drawable/radio_black.xml b/app/src/main/res/drawable/radio_black.xml new file mode 100644 index 000000000..e56592374 --- /dev/null +++ b/app/src/main/res/drawable/radio_black.xml @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/radio_hover.xml b/app/src/main/res/drawable/radio_hover.xml new file mode 100644 index 000000000..6a9b71f38 --- /dev/null +++ b/app/src/main/res/drawable/radio_hover.xml @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/radio_off.xml b/app/src/main/res/drawable/radio_off.xml index 53555a1e5..231adc70a 100644 --- a/app/src/main/res/drawable/radio_off.xml +++ b/app/src/main/res/drawable/radio_off.xml @@ -1,30 +1,6 @@ - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + Date: Wed, 26 Jun 2019 09:16:37 +0200 Subject: [PATCH 2/2] Updated hover and switch specs --- app/src/main/res/drawable/radio.xml | 7 ++- .../main/res/drawable/radio_checked_hover.xml | 18 +++++++ ...io_hover.xml => radio_unchecked_hover.xml} | 0 .../res/drawable/radio_unchecked_pressed.xml | 18 +++++++ app/src/main/res/drawable/switch_track.xml | 48 ++++++++++++++++++- app/src/main/res/values/colors.xml | 2 + 6 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/drawable/radio_checked_hover.xml rename app/src/main/res/drawable/{radio_hover.xml => radio_unchecked_hover.xml} (100%) create mode 100644 app/src/main/res/drawable/radio_unchecked_pressed.xml diff --git a/app/src/main/res/drawable/radio.xml b/app/src/main/res/drawable/radio.xml index 8570bf0b2..03bd3176b 100644 --- a/app/src/main/res/drawable/radio.xml +++ b/app/src/main/res/drawable/radio.xml @@ -9,7 +9,12 @@ android:state_checked="false" android:state_pressed="true" /> + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/radio_hover.xml b/app/src/main/res/drawable/radio_unchecked_hover.xml similarity index 100% rename from app/src/main/res/drawable/radio_hover.xml rename to app/src/main/res/drawable/radio_unchecked_hover.xml diff --git a/app/src/main/res/drawable/radio_unchecked_pressed.xml b/app/src/main/res/drawable/radio_unchecked_pressed.xml new file mode 100644 index 000000000..e56592374 --- /dev/null +++ b/app/src/main/res/drawable/radio_unchecked_pressed.xml @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/switch_track.xml b/app/src/main/res/drawable/switch_track.xml index 318d25ae9..6d83a88ba 100644 --- a/app/src/main/res/drawable/switch_track.xml +++ b/app/src/main/res/drawable/switch_track.xml @@ -22,7 +22,7 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 9d5e26eae..0a7f629a3 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -23,7 +23,9 @@ #30e2e6eb #c2c6cb #8dc63f + #579334 #ef4136 + #cc332f #25003e #ff921e #5d5d5d