diff options
author | Tony Wickham <twickham@google.com> | 2017-02-27 13:30:20 -0800 |
---|---|---|
committer | Tony <twickham@google.com> | 2017-03-01 16:36:04 -0800 |
commit | 6c82867a7ea3a95a19d6cec7d1fe164d234d2cb6 (patch) | |
tree | a57698edcf4ac0da9541e6e657c1c7ac9e2ff0d1 /src/com/android/launcher3/dragndrop | |
parent | cf18c3c2d14b54896e51fec829ae2d89642a59eb (diff) | |
download | android_packages_apps_Trebuchet-6c82867a7ea3a95a19d6cec7d1fe164d234d2cb6.tar.gz android_packages_apps_Trebuchet-6c82867a7ea3a95a19d6cec7d1fe164d234d2cb6.tar.bz2 android_packages_apps_Trebuchet-6c82867a7ea3a95a19d6cec7d1fe164d234d2cb6.zip |
Add shadow to badges
- Add static method to ShadowGenerator to generate a
circle Bitmap with a shadow.
- Move setColorScale() from DragView to Themes, and
use it to apply color to the shadowed Bitmap.
Bug: 35744066
Change-Id: I8d1da528bbf94dc83851f0b4016361ed9f8d5349
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
-rw-r--r-- | src/com/android/launcher3/dragndrop/DragView.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java index e4c9be4db..7806c98be 100644 --- a/src/com/android/launcher3/dragndrop/DragView.java +++ b/src/com/android/launcher3/dragndrop/DragView.java @@ -24,7 +24,6 @@ import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.ColorMatrix; import android.graphics.ColorMatrixColorFilter; import android.graphics.Paint; @@ -36,6 +35,7 @@ import android.view.animation.DecelerateInterpolator; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAnimUtils; import com.android.launcher3.R; +import com.android.launcher3.util.Themes; import com.android.launcher3.util.Thunk; import java.util.Arrays; @@ -259,7 +259,7 @@ public class DragView extends View { m1.setSaturation(0); ColorMatrix m2 = new ColorMatrix(); - setColorScale(color, m2); + Themes.setColorScaleOnMatrix(color, m2); m1.postConcat(m2); animateFilterTo(m1.getArray()); @@ -384,11 +384,6 @@ public class DragView extends View { } } - public static void setColorScale(int color, ColorMatrix target) { - target.setScale(Color.red(color) / 255f, Color.green(color) / 255f, - Color.blue(color) / 255f, Color.alpha(color) / 255f); - } - public int getBlurSizeOutline() { return mBlurSizeOutline; } |