Use support.v7.palette to get header tint
Todo in later cls:
-save the extracted tint, so we don't have unnecessary delay
when returning from the edit screen
-animate the change of tint color. This matters for tablet
and after the photo changes.
Change-Id: I11685c1489a5c7b49f46c250033f4f303b076ef6
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java
index ff5c13f..9df3c61 100644
--- a/src/com/android/contacts/widget/MultiShrinkScroller.java
+++ b/src/com/android/contacts/widget/MultiShrinkScroller.java
@@ -52,6 +52,7 @@
private View mToolbar;
private ImageView mPhotoView;
private MultiShrinkScrollerListener mListener;
+ private int mHeaderTintColor;
private final Scroller mScroller;
private final EdgeEffect mEdgeGlowBottom;
@@ -64,7 +65,6 @@
private final int mElasticScrollOverTopRegion;
private final PorterDuffColorFilter mColorFilter
= new PorterDuffColorFilter(0, PorterDuff.Mode.SRC_ATOP);
- private final int mHeaderTintColor;
public interface MultiShrinkScrollerListener {
void onScrolledOffBottom();
@@ -219,6 +219,11 @@
return true;
}
+ public void setHeaderTintColor(int color) {
+ mHeaderTintColor = color;
+ updatePhotoTint();
+ }
+
private void startDrag() {
mIsBeingDragged = true;
mScroller.abortAnimation();