Fix round button

This commit is contained in:
PavelRatushny 2017-08-18 11:22:57 +03:00
parent a3b64abc71
commit a0bb8852d2
6 changed files with 37 additions and 8 deletions

View file

@ -3,22 +3,22 @@
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="?attr/bg_color" />
<stroke android:color="@color/map_widget_blue_pressed" android:width="3dp"/>
<solid android:color="@color/bg_color_dark" />
<stroke android:color="@color/map_widget_blue_pressed" android:width="1dp"/>
<corners android:radius="@dimen/map_button_rect_rad" />
</shape>
</item>
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="?attr/bg_color" />
<stroke android:color="@color/searchbar_tab_inactive_light" android:width="3dp"/>
<solid android:color="@color/bg_color_dark" />
<stroke android:color="@color/searchbar_tab_inactive_light" android:width="1dp"/>
<corners android:radius="@dimen/map_button_rect_rad" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="?attr/bg_color" />
<stroke android:color="@color/map_widget_blue" android:width="3dp"/>
<solid android:color="@color/bg_color_dark" />
<stroke android:color="@color/map_widget_blue" android:width="1dp"/>
<corners android:radius="@dimen/map_button_rect_rad" />
</shape>
</item>

View file

@ -0,0 +1,26 @@
<?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">
<solid android:color="@color/bg_color_light" />
<stroke android:color="@color/map_widget_blue_pressed" android:width="1dp"/>
<corners android:radius="@dimen/map_button_rect_rad" />
</shape>
</item>
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/bg_color_light" />
<stroke android:color="@color/searchbar_tab_inactive_light" android:width="1dp"/>
<corners android:radius="@dimen/map_button_rect_rad" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/bg_color_light" />
<stroke android:color="@color/map_widget_blue" android:width="1dp"/>
<corners android:radius="@dimen/map_button_rect_rad" />
</shape>
</item>
</selector>

View file

@ -314,7 +314,7 @@
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/btn_round_white_border"
android:background="?attr/btn_round_border"
android:minHeight="36dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"

View file

@ -331,7 +331,7 @@
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/btn_round_white_border"
android:background="?attr/btn_round_border"
android:minHeight="36dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"

View file

@ -16,6 +16,7 @@
<attr name="expandable_list_item_background" format="color"/>
<attr name="expandable_list_background" format="color"/>
<attr name="bg_color" format="reference" />
<attr name="btn_round_border" format="reference" />
<attr name="bg_card" format="reference" />
<attr name="context_menu_card" format="reference" />
<attr name="ctx_menu_card_btn" format="reference" />

View file

@ -109,6 +109,7 @@
<item name="actionModeBackground">@color/actionbar_light_color</item>
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
<item name="bg_color">@color/bg_color_light</item>
<item name="btn_round_border">@drawable/btn_round_border_light</item>
<item name="bg_card">@drawable/bg_card_light</item>
<item name="context_menu_card">@drawable/context_menu_card_light</item>
<item name="bg_map_context_menu">@drawable/bg_map_context_menu_light</item>
@ -282,6 +283,7 @@
<item name="actionModeBackground">@color/actionbar_dark_color</item>
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
<item name="bg_color">@color/bg_color_dark</item>
<item name="btn_round_border">@drawable/btn_round_border_dark</item>
<item name="bg_card">@drawable/bg_card_dark</item>
<item name="context_menu_card">@drawable/context_menu_card_dark</item>
<item name="bg_map_context_menu">@drawable/bg_map_context_menu_dark</item>