"Done" button style

This commit is contained in:
Dima-1 2020-09-01 10:09:25 +03:00
parent b89813a411
commit 878056cceb
5 changed files with 74 additions and 16 deletions

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/active_color_primary_dark">
<item>
<shape>
<solid android:color="@color/switch_button_active_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_dark" />
</shape>
</item>
<item
android:id="@android:id/mask"
android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
</ripple>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/active_color_primary_light">
<item>
<shape>
<solid android:color="@color/switch_button_active_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_light" />
</shape>
</item>
<item
android:id="@android:id/mask"
android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
</ripple>

View file

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
<item>
<shape>
<solid android:color="@color/switch_button_active_dark" />
<corners android:radius="3dp" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_dark" />
</shape>
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
</selector>

View file

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
<item>
<shape>
<solid android:color="@color/switch_button_active_light" />
<corners android:radius="3dp" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_light" />
</shape>
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -2027,8 +2027,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
int paddingH = ctx.getResources().getDimensionPixelSize(R.dimen.context_menu_padding_margin_large);
int paddingV = ctx.getResources().getDimensionPixelSize(R.dimen.context_menu_padding_margin_small);
done.setPadding(paddingH, paddingV, paddingH, paddingV);
AndroidUtils.setBackground(ctx, done, nightMode, R.drawable.dlg_btn_stroked_light,
R.drawable.dlg_btn_stroked_dark);
AndroidUtils.setBackground(ctx, done, nightMode, R.drawable.purchase_dialog_outline_btn_bg_light,
R.drawable.purchase_dialog_outline_btn_bg_dark);
}
@Override