Fix #7138
This commit is contained in:
parent
907b7667b9
commit
0da1a6d756
8 changed files with 59 additions and 15 deletions
|
@ -8,7 +8,7 @@
|
|||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/card_and_list_background_dark" />
|
||||
<solid android:color="@color/inactive_buttons_and_links_bg_dark" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<shape android:shape="rectangle">
|
||||
<solid android:color="@null" />
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/inactive_pages_dark" />
|
||||
<stroke android:width="1dp" android:color="@color/stroked_buttons_and_links_outline_dark" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -8,7 +8,7 @@
|
|||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/activity_background_light" />
|
||||
<solid android:color="@color/inactive_buttons_and_links_bg_light" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<shape android:shape="rectangle">
|
||||
<solid android:color="@null" />
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/profile_button_gray" />
|
||||
<stroke android:width="1dp" android:color="@color/stroked_buttons_and_links_outline_light" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -9,7 +9,7 @@
|
|||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/activity_background_dark" />
|
||||
<solid android:color="@color/inactive_buttons_and_links_bg_dark" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<shape android:shape="rectangle">
|
||||
<solid android:color="@null" />
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/divider_color_dark" />
|
||||
<stroke android:width="1dp" android:color="@color/stroked_buttons_and_links_outline_dark" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -9,7 +9,7 @@
|
|||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/activity_background_light" />
|
||||
<solid android:color="@color/inactive_buttons_and_links_bg_light" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<shape android:shape="rectangle">
|
||||
<solid android:color="@null" />
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/divider_color_light" />
|
||||
<stroke android:width="1dp" android:color="@color/stroked_buttons_and_links_outline_light" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
22
OsmAnd/res/drawable/btn_checked_border_dark.xml
Normal file
22
OsmAnd/res/drawable/btn_checked_border_dark.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/inactive_buttons_and_links_bg_dark" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@null" />
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
22
OsmAnd/res/drawable/btn_checked_border_light.xml
Normal file
22
OsmAnd/res/drawable/btn_checked_border_light.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/inactive_buttons_and_links_bg_light" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@null" />
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -29,7 +29,7 @@
|
|||
android:gravity="center_horizontal"
|
||||
android:lines="2"
|
||||
android:maxLines="2"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
tools:text="Remove POI"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -167,10 +167,10 @@ public class AppModeDialog {
|
|||
iv.setImageDrawable(drawable);
|
||||
iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_checked)));
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||
AndroidUtils.setBackground(ctx, iv, nightMode, R.drawable.btn_border_light, R.drawable.btn_border_dark);
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.ripple_light, R.drawable.ripple_dark);
|
||||
AndroidUtils.setBackground(ctx, iv, nightMode, R.drawable.btn_checked_border_light, R.drawable.btn_checked_border_light);
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.ripple_light, R.drawable.ripple_light);
|
||||
} else {
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.btn_border_trans_light, R.drawable.btn_border_trans_dark);
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.btn_border_trans_light, R.drawable.btn_border_trans_light);
|
||||
}
|
||||
} else {
|
||||
if (useMapTheme) {
|
||||
|
@ -180,10 +180,10 @@ public class AppModeDialog {
|
|||
}
|
||||
iv.setImageDrawable(drawable);
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||
AndroidUtils.setBackground(ctx, iv, nightMode, R.drawable.btn_border_pressed_light, R.drawable.btn_border_pressed_dark);
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.ripple_light, R.drawable.ripple_dark);
|
||||
AndroidUtils.setBackground(ctx, iv, nightMode, R.drawable.btn_border_pressed_light, R.drawable.btn_border_pressed_light);
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.ripple_light, R.drawable.ripple_light);
|
||||
} else {
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.btn_border_pressed_trans_light, R.drawable.btn_border_pressed_trans_dark);
|
||||
AndroidUtils.setBackground(ctx, selection, nightMode, R.drawable.btn_border_pressed_trans_light, R.drawable.btn_border_pressed_trans_light);
|
||||
}
|
||||
} else {
|
||||
iv.setImageDrawable(ctx.getUIUtilities().getIcon(mode.getIconRes(), mode.getIconColorInfo().getColor(nightMode)));
|
||||
|
|
Loading…
Reference in a new issue