Fixes: Fav icon and FAB color

This commit is contained in:
Alexey Kulish 2015-10-21 15:16:29 +03:00
parent 7971899220
commit 93a6ec6ecb
6 changed files with 57 additions and 7 deletions

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/fab_background_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/fab_background_normal"></item>
</selector>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<bitmap
android:gravity="fill"
android:src="@drawable/map_bt_round_1_shadow" />
</item>
<item>
<inset
android:insetBottom="@dimen/map_button_inset_shadow"
android:insetLeft="@dimen/map_button_inset_shadow"
android:insetRight="@dimen/map_button_inset_shadow"
android:insetTop="@dimen/map_button_inset_shadow" >
<shape android:shape="oval" >
<solid android:color="@color/fab_color" />
</shape>
</inset>
</item>
</layer-list>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<bitmap
android:gravity="fill"
android:src="@drawable/map_bt_round_1_shadow" />
</item>
<item>
<inset
android:insetBottom="@dimen/map_button_inset_shadow"
android:insetLeft="@dimen/map_button_inset_shadow"
android:insetRight="@dimen/map_button_inset_shadow"
android:insetTop="@dimen/map_button_inset_shadow" >
<shape android:shape="oval" >
<solid android:color="@color/fab_color_pressed" />
</shape>
</inset>
</item>
</layer-list>

View file

@ -190,11 +190,11 @@
<ImageView
android:id="@+id/context_menu_fab_view"
android:layout_width="@dimen/map_button_size"
android:layout_height="@dimen/map_button_size"
android:layout_width="@dimen/fab_size_normal"
android:layout_height="@dimen/fab_size_normal"
android:layout_gravity="right"
android:layout_marginRight="12dp"
android:background="@drawable/btn_circle_blue"
android:background="@drawable/fab_background"
android:scaleType="center"
android:src="@drawable/map_directions"/>

View file

@ -31,8 +31,10 @@
<color name="list_item_dark_pressed">#be39464d</color>
<color name="bg_color_light">#fff</color>
<color name="bg_color_dark">#333b40</color>
<color name="fab_color">#ff8f00</color>
<color name="fab_color_pressed">#e58200</color>
<color name="map_widget_icon_color">#ff8f00</color>
<color name="map_widget_stroke">#4C000000</color>
<color name="map_widget_light">#fff</color>

View file

@ -33,8 +33,8 @@ public class FavoriteImageDrawable extends Drawable {
int col = color == 0 || color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : color;
paintIcon.setColorFilter(new PorterDuffColorFilter(col, PorterDuff.Mode.SRC_IN));
paintBackground = new Paint();
favIcon = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_action_fav_dark);
favBackground = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.map_white_shield);
favIcon = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.map_favorite);
favBackground = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.map_white_favorite_shield);
}
@Override