Loading core/java/android/widget/Magnifier.java +8 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.UiThread; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Outline; import android.graphics.Paint; import android.graphics.PixelFormat; Loading Loading @@ -319,6 +320,10 @@ public final class Magnifier { * producing a shakiness effect for the magnifier content. */ private static class InternalPopupWindow { // The alpha set on the magnifier's content, which defines how // prominent the white background is. private static final int CONTENT_BITMAP_ALPHA = 242; // Display associated to the view the magnifier is attached to. private final Display mDisplay; // The size of the content of the magnifier. Loading Loading @@ -511,10 +516,13 @@ public final class Magnifier { final DisplayListCanvas canvas = mBitmapRenderNode.start(mContentWidth, mContentHeight); try { canvas.drawColor(Color.WHITE); final Rect srcRect = new Rect(0, 0, mBitmap.getWidth(), mBitmap.getHeight()); final Rect dstRect = new Rect(0, 0, mContentWidth, mContentHeight); final Paint paint = new Paint(); paint.setFilterBitmap(true); paint.setAlpha(CONTENT_BITMAP_ALPHA); canvas.drawBitmap(mBitmap, srcRect, dstRect, paint); } finally { mBitmapRenderNode.end(canvas); Loading core/res/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ <!-- Magnifier dimensions --> <dimen name="magnifier_width">100dp</dimen> <dimen name="magnifier_height">48dp</dimen> <dimen name="magnifier_elevation">2dp</dimen> <dimen name="magnifier_elevation">4dp</dimen> <dimen name="magnifier_offset">42dp</dimen> <item type="dimen" format="float" name="magnifier_zoom_scale">1.25</item> Loading Loading
core/java/android/widget/Magnifier.java +8 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.UiThread; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Outline; import android.graphics.Paint; import android.graphics.PixelFormat; Loading Loading @@ -319,6 +320,10 @@ public final class Magnifier { * producing a shakiness effect for the magnifier content. */ private static class InternalPopupWindow { // The alpha set on the magnifier's content, which defines how // prominent the white background is. private static final int CONTENT_BITMAP_ALPHA = 242; // Display associated to the view the magnifier is attached to. private final Display mDisplay; // The size of the content of the magnifier. Loading Loading @@ -511,10 +516,13 @@ public final class Magnifier { final DisplayListCanvas canvas = mBitmapRenderNode.start(mContentWidth, mContentHeight); try { canvas.drawColor(Color.WHITE); final Rect srcRect = new Rect(0, 0, mBitmap.getWidth(), mBitmap.getHeight()); final Rect dstRect = new Rect(0, 0, mContentWidth, mContentHeight); final Paint paint = new Paint(); paint.setFilterBitmap(true); paint.setAlpha(CONTENT_BITMAP_ALPHA); canvas.drawBitmap(mBitmap, srcRect, dstRect, paint); } finally { mBitmapRenderNode.end(canvas); Loading
core/res/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ <!-- Magnifier dimensions --> <dimen name="magnifier_width">100dp</dimen> <dimen name="magnifier_height">48dp</dimen> <dimen name="magnifier_elevation">2dp</dimen> <dimen name="magnifier_elevation">4dp</dimen> <dimen name="magnifier_offset">42dp</dimen> <item type="dimen" format="float" name="magnifier_zoom_scale">1.25</item> Loading