diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2020-12-08 14:11:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 14:11:46 +0100 |
commit | b42e5e6eb5396f17cfaeb48b62f2bd889d1772b7 (patch) | |
tree | 72d5daa565c0de59a0f7a5e0b9fbcd998ff1ea5b /core/src/main | |
parent | 167a51df59f5904140f097079e8c019d6a53e725 (diff) | |
parent | a510cb00fdcd2fdc4c5a62a1d12ef3d27886e1a4 (diff) | |
download | AntennaPod-b42e5e6eb5396f17cfaeb48b62f2bd889d1772b7.zip |
Merge pull request #4733 from ByteHamster/fix-filter-dialog-api21
Fix filter dialog on old Android versions
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/res/drawable-v21/ic_filter_close.xml | 55 | ||||
-rw-r--r-- | core/src/main/res/drawable/ic_filter_close.xml | 8 | ||||
-rw-r--r-- | core/src/main/res/values/attrs.xml | 2 | ||||
-rw-r--r-- | core/src/main/res/values/styles.xml | 5 |
4 files changed, 65 insertions, 5 deletions
diff --git a/core/src/main/res/drawable-v21/ic_filter_close.xml b/core/src/main/res/drawable-v21/ic_filter_close.xml new file mode 100644 index 000000000..9e0a26905 --- /dev/null +++ b/core/src/main/res/drawable-v21/ic_filter_close.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + + <item + android:bottom="5dp" + android:left="5dp" + android:right="5dp" + android:top="5dp"> + + <shape android:shape="oval"> + <stroke + android:width="4dp" + android:color="?attr/filter_dialog_clear" /> + </shape> + </item> + + <!-- x --> + <item + android:bottom="12dp" + android:left="12dp" + android:right="12dp" + android:top="12dp"> + <rotate + android:fromDegrees="135" + android:pivotX="50%" + android:pivotY="50%" + android:toDegrees="135"> + <shape android:shape="line"> + <stroke + android:width="4dp" + android:color="?attr/filter_dialog_clear" /> + </shape> + </rotate> + </item> + + <item + android:bottom="12dp" + android:left="12dp" + android:right="12dp" + android:top="12dp"> + <rotate + android:fromDegrees="45" + android:pivotX="50%" + android:pivotY="50%" + android:toDegrees="45"> + <shape android:shape="line"> + <stroke + android:width="4dp" + android:color="?attr/filter_dialog_clear" /> + </shape> + + </rotate> + </item> + +</layer-list>
\ No newline at end of file diff --git a/core/src/main/res/drawable/ic_filter_close.xml b/core/src/main/res/drawable/ic_filter_close.xml index 9e0a26905..4d7eedb30 100644 --- a/core/src/main/res/drawable/ic_filter_close.xml +++ b/core/src/main/res/drawable/ic_filter_close.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - + <!-- Fall-back for old Android devices that do not support attrs as colors --> <item android:bottom="5dp" android:left="5dp" @@ -10,7 +10,7 @@ <shape android:shape="oval"> <stroke android:width="4dp" - android:color="?attr/filter_dialog_clear" /> + android:color="#555" /> </shape> </item> @@ -28,7 +28,7 @@ <shape android:shape="line"> <stroke android:width="4dp" - android:color="?attr/filter_dialog_clear" /> + android:color="#555" /> </shape> </rotate> </item> @@ -46,7 +46,7 @@ <shape android:shape="line"> <stroke android:width="4dp" - android:color="?attr/filter_dialog_clear" /> + android:color="#555" /> </shape> </rotate> diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml index a78f837bf..3a5ec310b 100644 --- a/core/src/main/res/values/attrs.xml +++ b/core/src/main/res/values/attrs.xml @@ -58,7 +58,7 @@ <attr name="action_icon_color" format="color"/> <attr name="scrollbar_thumb" format="reference"/> <attr name="background_elevated" format="color"/> - <attr name="filter_dialog_clear" format="reference"/> + <attr name="filter_dialog_clear" format="color"/> <attr name="filter_dialog_button_background" format="reference"/> <attr name="ic_notifications" format="reference"/> diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index 9ec82215a..b5c10ae0e 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -318,4 +318,9 @@ <item name="android:clickable">true</item> </style> + <style name="NoButtonRadio" parent="Widget.MaterialComponents.CompoundButton.RadioButton"> + <item name="buttonCompat">@null</item> <!-- For Android 4.4 --> + <item name="android:button">@null</item> + </style> + </resources> |