mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
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
This commit is contained in:
@@ -42,6 +42,7 @@ import com.android.launcher3.dragndrop.DragController;
|
||||
import com.android.launcher3.dragndrop.DragLayer;
|
||||
import com.android.launcher3.dragndrop.DragOptions;
|
||||
import com.android.launcher3.dragndrop.DragView;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
|
||||
/**
|
||||
@@ -142,8 +143,8 @@ public abstract class ButtonDropTarget extends TextView
|
||||
mCurrentFilter = new ColorMatrix();
|
||||
}
|
||||
|
||||
DragView.setColorScale(getTextColor(), mSrcFilter);
|
||||
DragView.setColorScale(targetColor, mDstFilter);
|
||||
Themes.setColorScaleOnMatrix(getTextColor(), mSrcFilter);
|
||||
Themes.setColorScaleOnMatrix(targetColor, mDstFilter);
|
||||
ValueAnimator anim1 = ValueAnimator.ofObject(
|
||||
new FloatArrayEvaluator(mCurrentFilter.getArray()),
|
||||
mSrcFilter.getArray(), mDstFilter.getArray());
|
||||
|
||||
Reference in New Issue
Block a user