diff --git a/android/res/values/colors.xml b/android/res/values/colors.xml
index 216fbc36ac..cb59f03216 100644
--- a/android/res/values/colors.xml
+++ b/android/res/values/colors.xml
@@ -161,9 +161,12 @@
#FF555A5A
#28000000
#28FFFFFF
- #FFF3EBDA
- #4CFFFAE1
+ #FFF3EBDA
+ #4CFFFAE1
#FFFFFBF2
#FFFFFBF2
+ #FF888A82
+ #FFD9D2C3
+ #FF71736C
diff --git a/android/res/values/themes-base.xml b/android/res/values/themes-base.xml
index 3efddc2f2f..56621bb046 100644
--- a/android/res/values/themes-base.xml
+++ b/android/res/values/themes-base.xml
@@ -86,7 +86,7 @@
- @color/text_banner_color
- @color/bg_banner_color
- - @color/bg_banner_button_color
+ - @color/bg_banner_button
- @drawable/bg_ads
- @color/text_ads_color
- @drawable/bg_ads_action
@@ -187,7 +187,7 @@
- @color/text_banner_color_night
- @color/bg_banner_color_night
- - @color/bg_banner_button_color_night
+ - @color/bg_banner_button_night
- @drawable/bg_ads_night
- @color/text_ads_color_night
- @drawable/bg_ads_action_night
diff --git a/android/src/com/mapswithme/maps/widget/placepage/BannerController.java b/android/src/com/mapswithme/maps/widget/placepage/BannerController.java
index 3a04a9c33d..3841b42ae0 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/BannerController.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/BannerController.java
@@ -1,6 +1,8 @@
package com.mapswithme.maps.widget.placepage;
+import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
+import android.content.Context;
import android.content.res.Resources;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -18,6 +20,7 @@ import com.mapswithme.maps.ads.MwmNativeAd;
import com.mapswithme.maps.ads.NativeAdError;
import com.mapswithme.maps.ads.NativeAdListener;
import com.mapswithme.util.Config;
+import com.mapswithme.util.ThemeUtils;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.log.Logger;
import com.mapswithme.util.log.LoggerFactory;
@@ -99,11 +102,7 @@ final class BannerController
@Override
public void onClick(View v)
{
- View view = mOpened ? mFrame.findViewById(R.id.tv__action_large)
- : mFrame.findViewById(R.id.tv__action_small);
- ObjectAnimator anim = ObjectAnimator.ofFloat(view, "alpha", 0.3f, 1f);
- anim.setDuration(700);
- anim.start();
+ animateActionButton();
}
});
}
@@ -263,6 +262,30 @@ final class BannerController
return isTouched(mFrame, event);
}
+ private void animateActionButton()
+ {
+ View view = mOpened ? mFrame.findViewById(R.id.tv__action_large)
+ : mFrame.findViewById(R.id.tv__action_small);
+ ObjectAnimator animator;
+ if (mOpened)
+ {
+ Context context = mFrame.getContext();
+ Resources res = context.getResources();
+ int colorFrom = ThemeUtils.isNightTheme() ? res.getColor(R.color.banner_action_btn_start_anim_night)
+ : res.getColor(R.color.bg_banner_button);
+ int colorTo = ThemeUtils.isNightTheme() ? res.getColor(R.color.banner_action_btn_end_anim_night)
+ : res.getColor(R.color.banner_action_btn_end_anim);
+ animator = ObjectAnimator.ofObject(view, "backgroundColor", new ArgbEvaluator(),
+ colorFrom, colorTo, colorFrom);
+ }
+ else
+ {
+ animator = ObjectAnimator.ofFloat(view, "alpha", 0.3f, 1f);
+ }
+ animator.setDuration(300);
+ animator.start();
+ }
+
interface BannerListener
{
void onSizeChanged();