diff options
author | Michael Jurka <mikejurka@google.com> | 2010-09-09 12:09:25 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2010-09-09 12:32:11 -0700 |
commit | 4347705a09dc0de776073a2500cb3d695aee1b79 (patch) | |
tree | 888536480483d422b99c80317b4914514ec6b170 /src/com/android | |
parent | 99229f67d1d00b421003f2795f850b5704c6c7aa (diff) | |
download | packages_apps_trebuchet-4347705a09dc0de776073a2500cb3d695aee1b79.zip packages_apps_trebuchet-4347705a09dc0de776073a2500cb3d695aee1b79.tar.gz packages_apps_trebuchet-4347705a09dc0de776073a2500cb3d695aee1b79.tar.bz2 |
making mini screen backgrounds dark, and
temporarily disabling dimmed items on mini screens
to work better with new dark wallpaper
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 7ae26bb..8cf7041 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -131,9 +131,11 @@ public class CellLayout extends ViewGroup { if (LauncherApplication.isScreenXLarge()) { mDimmedBitmapBackground = getResources().getDrawable( R.drawable.mini_home_screen_bg); + mDimmedBitmapBackground.setFilterBitmap(true); mDimmedBitmapBackgroundHover = getResources().getDrawable( R.drawable.mini_home_screen_bg_hover); + mDimmedBitmapBackgroundHover.setFilterBitmap(true); } TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CellLayout, defStyle, 0); @@ -196,7 +198,7 @@ public class CellLayout extends ViewGroup { } mDimmedBitmapPaint.setAlpha((int) (mDimmedBitmapAlpha * 255)); - canvas.drawBitmap(mDimmedBitmap, mDimmedBitmapRect, mLayoutRect, mDimmedBitmapPaint); + //canvas.drawBitmap(mDimmedBitmap, mDimmedBitmapRect, mLayoutRect, mDimmedBitmapPaint); } } @@ -240,7 +242,7 @@ public class CellLayout extends ViewGroup { // We might be in the middle or end of shrinking/fading to a dimmed view // Make sure this view's alpha is set the same as all the rest of the views - child.setAlpha(1.0f - mDimmedBitmapAlpha); + //child.setAlpha(1.0f - mDimmedBitmapAlpha); addView(child, index, lp); @@ -629,7 +631,7 @@ public class CellLayout extends ViewGroup { updateDimmedBitmap(); } mDimmedBitmapAlpha = alpha; - setChildrenAlpha(1.0f - mDimmedBitmapAlpha); + //setChildrenAlpha(1.0f - mDimmedBitmapAlpha); invalidate(); } @@ -652,10 +654,10 @@ public class CellLayout extends ViewGroup { // draw the screen into the bitmap // just for drawing to the bitmap, make all the items on the screen opaque - setChildrenAlpha(1.0f); + //setChildrenAlpha(1.0f); // call our superclass's dispatchdraw so we don't draw the background super.dispatchDraw(mDimmedBitmapCanvas); - setChildrenAlpha(1.0f - mDimmedBitmapAlpha); + //setChildrenAlpha(1.0f - mDimmedBitmapAlpha); // replace all colored areas with a dark (semi-transparent black) mDimmedBitmapCanvas.drawColor(Color.argb(160, 0, 0, 0), PorterDuff.Mode.SRC_IN); |