Redesign filter dialog

This commit is contained in:
bws9000 2020-06-27 10:24:26 -04:00
parent 7de9e0d4c1
commit a4ce162491
10 changed files with 80 additions and 24 deletions

View File

@ -2,7 +2,6 @@ package de.danoeh.antennapod.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

View File

@ -25,8 +25,8 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/filter_dialog_button_background_light"
android:textColor="@color/filter_dialog_button_text_light"
android:background="@drawable/filter_dialog_button_background_light"
android:textColor="@drawable/filter_dialog_button_text_light"
android:button="@android:color/transparent"
android:layout_marginRight="2dp"
android:layout_marginEnd="2dp"
@ -40,8 +40,8 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/filter_dialog_button_background_light"
android:textColor="@color/filter_dialog_button_text_light"
android:background="@drawable/filter_dialog_button_background_light"
android:textColor="@drawable/filter_dialog_button_text_light"
android:button="@android:color/transparent"
android:checked="false"
android:foreground="?attr/selectableItemBackground"
@ -54,7 +54,7 @@
android:id="@+id/filter_dialog_clear"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/ic_filter_close_light"
android:background="@drawable/filter_dialog_button_clear"
android:button="@android:color/transparent"
android:foreground="?attr/selectableItemBackground"
android:tag=""

View File

@ -6,10 +6,10 @@ public enum FeedItemFilterGroup {
PLAYED(new ItemProperties(R.string.hide_played_episodes_label, "played"),
new ItemProperties(R.string.not_played, "unplayed")),
PAUSED(new ItemProperties(R.string.hide_paused_episodes_label, "paused"),
new ItemProperties(R.string.not_paused, "")),
new ItemProperties(R.string.not_paused, "_no_id_not_paused")),
FAVORITE(new ItemProperties(R.string.hide_is_favorite_label, "is_favorite"),
new ItemProperties(R.string.not_favorite, "")),
MEDIA(new ItemProperties(R.string.has_media, ""),
new ItemProperties(R.string.not_favorite, "_no_id_not_favorite")),
MEDIA(new ItemProperties(R.string.has_media, "_no_id_no_media"),
new ItemProperties(R.string.no_media, "no_media")),
QUEUED(new ItemProperties(R.string.queued_label, "queued"),
new ItemProperties(R.string.not_queued_label, "not_queued")),

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="@color/accent_light" />
<item android:color="@color/master_switch_background_light" />
</selector>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="@color/grey" />
<item android:color="@color/master_switch_background_light" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/accent_light" android:state_checked="true" />
<item android:drawable="@color/master_switch_background_light" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_filter_close_dark" android:state_checked="true" />
<item android:drawable="@drawable/ic_filter_close_light" />
</selector>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="@color/white" />
<item android:color="@color/white" android:state_checked="true" />
<item android:color="@color/black" />
</selector>
</selector>

View File

@ -0,0 +1,56 @@
<?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="@color/grey" />
</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="@color/grey" />
</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="@color/grey" />
</shape>
</rotate>
</item>
</layer-list>

View File

@ -10,7 +10,7 @@
<shape android:shape="oval">
<stroke
android:width="4dp"
android:color="@color/filter_dialog_button_clear" />
android:color="@color/master_switch_background_light" />
</shape>
</item>
@ -28,7 +28,7 @@
<shape android:shape="line">
<stroke
android:width="4dp"
android:color="@color/filter_dialog_button_clear" />
android:color="@color/master_switch_background_light" />
</shape>
</rotate>
</item>
@ -46,8 +46,9 @@
<shape android:shape="line">
<stroke
android:width="4dp"
android:color="@color/filter_dialog_button_clear" />
android:color="@color/master_switch_background_light" />
</shape>
</rotate>
</item>