mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Adding holographic outline for paged items (sans widgets).
Fixing possible null ptr exception in Launcher. Change-Id: Ie625a6503299cf122e5c22852846d59e66f77414
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.launcher2;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
@@ -26,6 +27,7 @@ class FastBitmapDrawable extends Drawable {
|
||||
private Bitmap mBitmap;
|
||||
private int mWidth;
|
||||
private int mHeight;
|
||||
private final Paint mPaint = new Paint();
|
||||
|
||||
FastBitmapDrawable(Bitmap b) {
|
||||
mBitmap = b;
|
||||
@@ -39,7 +41,7 @@ class FastBitmapDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
canvas.drawBitmap(mBitmap, 0.0f, 0.0f, null);
|
||||
canvas.drawBitmap(mBitmap, 0.0f, 0.0f, mPaint);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,6 +51,7 @@ class FastBitmapDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public void setAlpha(int alpha) {
|
||||
mPaint.setAlpha(alpha);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user