Merge "Adds MaskableIconDrawable class to android.graphics.drawable package"
This commit is contained in:
committed by
Android (Google) Code Review
commit
8d07bfa437
@@ -13662,6 +13662,23 @@ package android.graphics.drawable {
|
||||
method public void addLevel(int, int, android.graphics.drawable.Drawable);
|
||||
}
|
||||
|
||||
public class MaskableIconDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
|
||||
ctor public MaskableIconDrawable(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
|
||||
method public void draw(android.graphics.Canvas);
|
||||
method public android.graphics.drawable.Drawable getBackground();
|
||||
method public android.graphics.drawable.Drawable getForeground();
|
||||
method public android.graphics.Path getIconMask();
|
||||
method public int getOpacity();
|
||||
method public void invalidateDrawable(android.graphics.drawable.Drawable);
|
||||
method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
|
||||
method public void setAlpha(int);
|
||||
method public void setColorFilter(android.graphics.ColorFilter);
|
||||
method public void setOpacity(int);
|
||||
method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
|
||||
field public static final float DEFAULT_VIEW_PORT_SCALE = 0.6666667f;
|
||||
field public static final float MASK_SIZE = 100.0f;
|
||||
}
|
||||
|
||||
public class NinePatchDrawable extends android.graphics.drawable.Drawable {
|
||||
ctor public deprecated NinePatchDrawable(android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
|
||||
ctor public NinePatchDrawable(android.content.res.Resources, android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
|
||||
|
||||
@@ -14218,6 +14218,23 @@ package android.graphics.drawable {
|
||||
method public void addLevel(int, int, android.graphics.drawable.Drawable);
|
||||
}
|
||||
|
||||
public class MaskableIconDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
|
||||
ctor public MaskableIconDrawable(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
|
||||
method public void draw(android.graphics.Canvas);
|
||||
method public android.graphics.drawable.Drawable getBackground();
|
||||
method public android.graphics.drawable.Drawable getForeground();
|
||||
method public android.graphics.Path getIconMask();
|
||||
method public int getOpacity();
|
||||
method public void invalidateDrawable(android.graphics.drawable.Drawable);
|
||||
method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
|
||||
method public void setAlpha(int);
|
||||
method public void setColorFilter(android.graphics.ColorFilter);
|
||||
method public void setOpacity(int);
|
||||
method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
|
||||
field public static final float DEFAULT_VIEW_PORT_SCALE = 0.6666667f;
|
||||
field public static final float MASK_SIZE = 100.0f;
|
||||
}
|
||||
|
||||
public class NinePatchDrawable extends android.graphics.drawable.Drawable {
|
||||
ctor public deprecated NinePatchDrawable(android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
|
||||
ctor public NinePatchDrawable(android.content.res.Resources, android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
|
||||
|
||||
@@ -13694,6 +13694,23 @@ package android.graphics.drawable {
|
||||
method public void addLevel(int, int, android.graphics.drawable.Drawable);
|
||||
}
|
||||
|
||||
public class MaskableIconDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Drawable.Callback {
|
||||
ctor public MaskableIconDrawable(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
|
||||
method public void draw(android.graphics.Canvas);
|
||||
method public android.graphics.drawable.Drawable getBackground();
|
||||
method public android.graphics.drawable.Drawable getForeground();
|
||||
method public android.graphics.Path getIconMask();
|
||||
method public int getOpacity();
|
||||
method public void invalidateDrawable(android.graphics.drawable.Drawable);
|
||||
method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
|
||||
method public void setAlpha(int);
|
||||
method public void setColorFilter(android.graphics.ColorFilter);
|
||||
method public void setOpacity(int);
|
||||
method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
|
||||
field public static final float DEFAULT_VIEW_PORT_SCALE = 0.6666667f;
|
||||
field public static final float MASK_SIZE = 100.0f;
|
||||
}
|
||||
|
||||
public class NinePatchDrawable extends android.graphics.drawable.Drawable {
|
||||
ctor public deprecated NinePatchDrawable(android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
|
||||
ctor public NinePatchDrawable(android.content.res.Resources, android.graphics.Bitmap, byte[], android.graphics.Rect, java.lang.String);
|
||||
|
||||
@@ -5839,6 +5839,14 @@
|
||||
<attr name="color" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Drawable used to draw masked icons with foreground and background layers. -->
|
||||
<declare-styleable name="MaskableIconDrawableLayer">
|
||||
<!-- The color to use for the layer, only if drawable is not defined. -->
|
||||
<attr name="color" />
|
||||
<!-- The drawable to use for the layer. -->
|
||||
<attr name="drawable" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Drawable used to show animated touch feedback. -->
|
||||
<declare-styleable name="RippleDrawable">
|
||||
<!-- The color to use for ripple effects. This attribute is required. -->
|
||||
|
||||
@@ -2712,6 +2712,9 @@
|
||||
<!-- Component name of the default cell broadcast receiver -->
|
||||
<string name="config_defaultCellBroadcastReceiverComponent" translatable="false">com.android.cellbroadcastreceiver/.PrivilegedCellBroadcastReceiver</string>
|
||||
|
||||
<!-- Specifies the path that is used by MaskableIconDrawable class to crop launcher icons. -->
|
||||
<string name="config_icon_mask" translatable="false">"M50,0L100,0 100,100 0,100 0,0z"</string>
|
||||
|
||||
<!-- The component name, flattened to a string, for the default accessibility service to be
|
||||
enabled by the accessibility shortcut. This service must be trusted, as it can be activated
|
||||
without explicit consent of the user. If no accessibility service with the specified name
|
||||
|
||||
@@ -2799,6 +2799,8 @@
|
||||
|
||||
<java-symbol type="raw" name="fallback_categories" />
|
||||
|
||||
<java-symbol type="string" name="config_icon_mask" />
|
||||
|
||||
<java-symbol type="attr" name="primaryContentAlpha" />
|
||||
|
||||
<!-- Accessibility Shortcut -->
|
||||
|
||||
@@ -147,6 +147,8 @@ public final class DrawableInflater {
|
||||
return new TransitionDrawable();
|
||||
case "ripple":
|
||||
return new RippleDrawable();
|
||||
case "maskable-icon":
|
||||
return new MaskableIconDrawable();
|
||||
case "color":
|
||||
return new ColorDrawable();
|
||||
case "shape":
|
||||
|
||||
1001
graphics/java/android/graphics/drawable/MaskableIconDrawable.java
Normal file
1001
graphics/java/android/graphics/drawable/MaskableIconDrawable.java
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user