summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2013-10-07 12:58:42 -0700
committerAdam Powell <adamp@google.com>2013-10-07 16:14:17 -0700
commit31049d76c55b18a6d9993f0d9687598740b16014 (patch)
tree79bf629079bfc443f3c00597912e415d92636200 /graphics
parentdbc31105bda3591d64e4d3e2abb3b3eaf857222e (diff)
downloadframeworks_base-31049d76c55b18a6d9993f0d9687598740b16014.zip
frameworks_base-31049d76c55b18a6d9993f0d9687598740b16014.tar.gz
frameworks_base-31049d76c55b18a6d9993f0d9687598740b16014.tar.bz2
Use SCREEN Xfermode for keyguard badges; update SeekBar
Plumb through the necessary API features through Drawables and ImageView but leave it hidden for now pending future API review and plumbing through the rest of the framework Drawable implementations. Update SeekBar assets used for keyguard transport control. Set selected status directly instead of finding views by id. Bug 10531608 Bug 10784913 Change-Id: Ia38bd04ad1bc26e9e6da1dda8a374c9ba3ceccb3
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/BitmapDrawable.java9
-rw-r--r--graphics/java/android/graphics/drawable/Drawable.java10
2 files changed, 19 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index 5ceab36..98e3386 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -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;
@@ -531,6 +532,14 @@ public class BitmapDrawable extends Drawable {
}
/**
+ * @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.
*
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 8135716..8a3d940 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -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;
@@ -428,6 +429,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.
*/