Merge pull request #5088 from alexzatsepin/MAPSME-3360-change-accent-color

[android] Changed an accent color for night theme and refreshed arrow…
This commit is contained in:
Arsentiy Milchakov 2016-12-26 14:58:13 +03:00 committed by GitHub
commit 30a663c897
53 changed files with 89 additions and 31 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
<item>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="?activeIconBackground"/>
<size
android:height="40dp"
android:width="40dp"/>
</shape>
</item>
</ripple>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
<item>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="?steadyIconBackground"/>
<size
android:height="40dp"
android:width="40dp"/>
</shape>
</item>
</ripple>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,002 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="?activeIconBackground"/>
<size
android:height="40dp"
android:width="40dp"/>
</shape>

View file

@ -0,0 +1,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="?steadyIconBackground"/>
<size
android:height="40dp"
android:width="40dp"/>
</shape>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_direction_pagepreview_pressed"
android:state_pressed="true"/>
<item android:drawable="@drawable/ic_direction_pagepreview"/>
</selector>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_direction_pagepreview_pressed_night"
android:state_pressed="true"/>
<item android:drawable="@drawable/ic_direction_pagepreview_night"/>
</selector>

View file

@ -71,8 +71,9 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_half"
android:layout_marginRight="@dimen/margin_half"
android:tint="?colorAccent"
android:scaleType="center"
android:src="?ppArrowDrawable"/>
android:src="@drawable/ic_direction_pagepreview"/>
<TextView
android:id="@+id/tv__straight_distance"

View file

@ -14,8 +14,10 @@
<ImageView
android:id="@+id/iv__set_visible"
android:layout_width="@dimen/height_item_oneline"
android:layout_height="@dimen/height_item_oneline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_half"
android:layout_marginStart="@dimen/margin_half"
android:layout_weight="0"
android:background="?clickableBackground"
android:scaleType="center"
@ -41,4 +43,4 @@
android:textAppearance="@style/MwmTextAppearance.Body2"
tools:text="42000000"/>
</LinearLayout>
</LinearLayout>

View file

@ -79,8 +79,9 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_half"
android:layout_marginRight="@dimen/margin_half"
android:tint="?colorAccent"
android:scaleType="center"
android:src="?ppArrowDrawable"/>
android:src="@drawable/ic_direction_pagepreview"/>
<TextView
android:id="@+id/tv__straight_distance"

View file

@ -9,9 +9,9 @@
<color name="text_light_hint">@color/white_lightest</color>
<color name="base_accent">#FF1E96F0</color>
<color name="base_accent_night">#FFFFE68C</color>
<color name="base_accent_night">#FF4BB9E6</color>
<color name="base_accent_pressed">#FF1C85D6</color>
<color name="base_accent_pressed_night">#FFCCB870</color>
<color name="base_accent_pressed_night">#FF3C9BBE</color>
<color name="base_red">#FFF54137</color>
<color name="base_yellow">#FFFFC30A</color>
@ -20,9 +20,12 @@
<color name="black_primary">#DE000000</color> <!-- 87% black -->
<color name="black_secondary">#8A000000</color> <!-- 54% black -->
<color name="black_lightest">#61000000</color> <!-- 38% black -->
<color name="black_8">#14000000</color> <!-- 8% black -->
<color name="white_primary">#FFFFFFFF</color> <!-- 100% white -->
<color name="white_secondary">#B3FFFFFF</color> <!-- 70% white -->
<color name="white_lightest">#4CFFFFFF</color> <!-- 50% white -->
<color name="white_8">#14FFFFFF</color> <!-- 8% white -->
<color name="icon_tint">#FF757575</color>
<color name="icon_tint_night">#FFC4C6C7</color>

View file

@ -23,7 +23,6 @@
<attr name="ppButtonsBackground" format="color"/>
<attr name="ppPreviewHeadOpen" format="reference"/>
<attr name="ppPreviewHeadClosed" format="reference"/>
<attr name="ppArrowDrawable" format="reference"/>
<attr name="ppRatingBackground" format="color"/>
<attr name="ppRatingText" format="color"/>
<attr name="ppPositive" format="reference"/>
@ -70,6 +69,11 @@
<attr name="bannerText" format="color"/>
<attr name="bannerBackground" format="color"/>
<attr name="steadyIconTint" format="color"/>
<attr name="steadyIconBackground" format="color"/>
<attr name="activeIconTint" format="color"/>
<attr name="activeIconBackground" format="color"/>
</declare-styleable>
<declare-styleable name="ThemeAttrs.NavButtons">
@ -89,4 +93,4 @@
<attr name="newsMarker" format="reference"/>
<attr name="searchLayoutBackground" format="reference"/>
</declare-styleable>
</resources>
</resources>

View file

@ -38,7 +38,6 @@
<item name="ppButtonsBackground">?panel</item>
<item name="ppPreviewHeadOpen">@drawable/bg_place_page_head_open</item>
<item name="ppPreviewHeadClosed">@drawable/bg_place_page_head_closed</item>
<item name="ppArrowDrawable">@drawable/direction</item>
<item name="routingSlot">@drawable/routing_slot_background</item>
<item name="routingSlotPressed">@drawable/routing_slot_background_pressed</item>
@ -86,6 +85,11 @@
<item name="bannerText">@color/text_banner_color</item>
<item name="bannerBackground">@color/bg_banner_color</item>
<item name="steadyIconTint">@color/black_secondary</item>
<item name="steadyIconBackground">@color/black_8</item>
<item name="activeIconTint">@color/bg_cards</item>
<item name="activeIconBackground">?colorAccent</item>
</style>
<!-- Night theme -->
@ -127,7 +131,6 @@
<item name="ppButtonsBackground">@color/bg_window_night</item>
<item name="ppPreviewHeadOpen">@drawable/bg_place_page_head_open_night</item>
<item name="ppPreviewHeadClosed">@drawable/bg_place_page_head_closed_night</item>
<item name="ppArrowDrawable">@drawable/direction_night</item>
<item name="routingSlot">@drawable/routing_slot_background_night</item>
<item name="routingSlotPressed">@drawable/routing_slot_background_pressed_night</item>
@ -175,5 +178,9 @@
<item name="bannerText">@color/text_banner_color_night</item>
<item name="bannerBackground">@color/bg_banner_color_night</item>
<item name="steadyIconTint">@color/white_secondary</item>
<item name="steadyIconBackground">@color/white_8</item>
<item name="activeIconTint">@color/bg_cards_night</item>
</style>
</resources>
</resources>

View file

@ -1,6 +1,7 @@
package com.mapswithme.maps.bookmarks;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
@ -13,7 +14,7 @@ import com.mapswithme.maps.bookmarks.data.BookmarkCategory;
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
import com.mapswithme.maps.widget.recycler.RecyclerClickListener;
import com.mapswithme.maps.widget.recycler.RecyclerLongClickListener;
import com.mapswithme.util.ThemeUtils;
import com.mapswithme.util.Graphics;
public class BookmarkCategoriesAdapter extends BaseBookmarkCategoryAdapter<BookmarkCategoriesAdapter.ViewHolder>
{
@ -130,10 +131,19 @@ public class BookmarkCategoriesAdapter extends BaseBookmarkCategoryAdapter<Bookm
void setVisibilityState(boolean visible)
{
visibilityMarker.setImageResource(ThemeUtils.isNightTheme() ? visible ? R.drawable.ic_bookmark_show_night
: R.drawable.ic_bookmark_hide_night
: visible ? R.drawable.ic_bookmark_show
: R.drawable.ic_bookmark_hide);
Drawable drawable;
if (visible)
{
visibilityMarker.setBackgroundResource(R.drawable.bg_active_icon);
drawable = Graphics.tint(visibilityMarker.getContext(), R.drawable.ic_bookmark_show, R.attr.activeIconTint);
}
else
{
visibilityMarker.setBackgroundResource(R.drawable.bg_steady_icon);
drawable = Graphics.tint(visibilityMarker.getContext(), R.drawable.ic_bookmark_hide,
R.attr.steadyIconTint);
}
visibilityMarker.setImageDrawable(drawable);
}
}
}