Loading core/java/android/widget/ImageView.java +15 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.graphics.Matrix; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.RectF; import android.graphics.Xfermode; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; Loading Loading @@ -73,6 +74,7 @@ public class ImageView extends View { // these are applied to the drawable private ColorFilter mColorFilter; private Xfermode mXfermode; private int mAlpha = 255; private int mViewAlphaScale = 256; private boolean mColorMod = false; Loading Loading @@ -1124,6 +1126,18 @@ public class ImageView extends View { setColorFilter(null); } /** * @hide Candidate for future API inclusion */ public final void setXfermode(Xfermode mode) { if (mXfermode != mode) { mXfermode = mode; mColorMod = true; applyColorMod(); invalidate(); } } /** * Returns the active color filter for this ImageView. * Loading Loading @@ -1200,6 +1214,7 @@ public class ImageView extends View { if (mDrawable != null && mColorMod) { mDrawable = mDrawable.mutate(); mDrawable.setColorFilter(mColorFilter); mDrawable.setXfermode(mXfermode); mDrawable.setAlpha(mAlpha * mViewAlphaScale >> 8); } } Loading graphics/java/android/graphics/drawable/BitmapDrawable.java +9 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.Shader; import android.graphics.Xfermode; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.LayoutDirection; Loading Loading @@ -530,6 +531,14 @@ public class BitmapDrawable extends Drawable { invalidateSelf(); } /** * @hide Candidate for future API inclusion */ public void setXfermode(Xfermode xfermode) { mBitmapState.mPaint.setXfermode(xfermode); invalidateSelf(); } /** * A mutable BitmapDrawable still shares its Bitmap with any other Drawable * that comes from the same resource. Loading graphics/java/android/graphics/drawable/Drawable.java +10 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.graphics.drawable; import android.graphics.Insets; import android.graphics.Xfermode; import android.os.Trace; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading Loading @@ -427,6 +428,15 @@ public abstract class Drawable { */ public abstract void setColorFilter(ColorFilter cf); /** * @hide Consider for future API inclusion */ public void setXfermode(Xfermode mode) { // Base implementation drops it on the floor for compatibility. Whee! // TODO: For this to be included in the API proper, all framework drawables need impls. // For right now only BitmapDrawable has it. } /** * Specify a color and porterduff mode to be the colorfilter for this * drawable. Loading packages/Keyguard/res/drawable-hdpi/progress_bg_holo_light.9.png 0 → 100644 +175 B Loading image diff... packages/Keyguard/res/drawable-hdpi/progress_primary_holo_light.9.png 0 → 100644 +413 B Loading image diff... Loading
core/java/android/widget/ImageView.java +15 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.graphics.Matrix; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.RectF; import android.graphics.Xfermode; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; Loading Loading @@ -73,6 +74,7 @@ public class ImageView extends View { // these are applied to the drawable private ColorFilter mColorFilter; private Xfermode mXfermode; private int mAlpha = 255; private int mViewAlphaScale = 256; private boolean mColorMod = false; Loading Loading @@ -1124,6 +1126,18 @@ public class ImageView extends View { setColorFilter(null); } /** * @hide Candidate for future API inclusion */ public final void setXfermode(Xfermode mode) { if (mXfermode != mode) { mXfermode = mode; mColorMod = true; applyColorMod(); invalidate(); } } /** * Returns the active color filter for this ImageView. * Loading Loading @@ -1200,6 +1214,7 @@ public class ImageView extends View { if (mDrawable != null && mColorMod) { mDrawable = mDrawable.mutate(); mDrawable.setColorFilter(mColorFilter); mDrawable.setXfermode(mXfermode); mDrawable.setAlpha(mAlpha * mViewAlphaScale >> 8); } } Loading
graphics/java/android/graphics/drawable/BitmapDrawable.java +9 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.Shader; import android.graphics.Xfermode; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.LayoutDirection; Loading Loading @@ -530,6 +531,14 @@ public class BitmapDrawable extends Drawable { invalidateSelf(); } /** * @hide Candidate for future API inclusion */ public void setXfermode(Xfermode xfermode) { mBitmapState.mPaint.setXfermode(xfermode); invalidateSelf(); } /** * A mutable BitmapDrawable still shares its Bitmap with any other Drawable * that comes from the same resource. Loading
graphics/java/android/graphics/drawable/Drawable.java +10 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.graphics.drawable; import android.graphics.Insets; import android.graphics.Xfermode; import android.os.Trace; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading Loading @@ -427,6 +428,15 @@ public abstract class Drawable { */ public abstract void setColorFilter(ColorFilter cf); /** * @hide Consider for future API inclusion */ public void setXfermode(Xfermode mode) { // Base implementation drops it on the floor for compatibility. Whee! // TODO: For this to be included in the API proper, all framework drawables need impls. // For right now only BitmapDrawable has it. } /** * Specify a color and porterduff mode to be the colorfilter for this * drawable. Loading
packages/Keyguard/res/drawable-hdpi/progress_bg_holo_light.9.png 0 → 100644 +175 B Loading image diff...
packages/Keyguard/res/drawable-hdpi/progress_primary_holo_light.9.png 0 → 100644 +413 B Loading image diff...