Lines Matching refs:Drawable

23 import android.graphics.drawable.Drawable;
35 * Helper for accessing features in {@link android.graphics.drawable.Drawable}
43 void jumpToCurrentState(Drawable drawable);
44 void setAutoMirrored(Drawable drawable, boolean mirrored);
45 boolean isAutoMirrored(Drawable drawable);
46 void setHotspot(Drawable drawable, float x, float y);
47 void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom);
48 void setTint(Drawable drawable, int tint);
49 void setTintList(Drawable drawable, ColorStateList tint);
50 void setTintMode(Drawable drawable, PorterDuff.Mode tintMode);
51 Drawable wrap(Drawable drawable);
52 boolean setLayoutDirection(Drawable drawable, int layoutDirection);
53 int getLayoutDirection(Drawable drawable);
54 int getAlpha(Drawable drawable);
55 void applyTheme(Drawable drawable, Resources.Theme t);
56 boolean canApplyTheme(Drawable drawable);
57 ColorFilter getColorFilter(Drawable drawable);
58 void clearColorFilter(Drawable drawable);
59 void inflate(Drawable drawable, Resources res, XmlPullParser parser, AttributeSet attrs,
68 public void jumpToCurrentState(Drawable drawable) {
72 public void setAutoMirrored(Drawable drawable, boolean mirrored) {
76 public boolean isAutoMirrored(Drawable drawable) {
81 public void setHotspot(Drawable drawable, float x, float y) {
85 public void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom) {
89 public void setTint(Drawable drawable, int tint) {
94 public void setTintList(Drawable drawable, ColorStateList tint) {
99 public void setTintMode(Drawable drawable, PorterDuff.Mode tintMode) {
104 public Drawable wrap(Drawable drawable) {
109 public boolean setLayoutDirection(Drawable drawable, int layoutDirection) {
115 public int getLayoutDirection(Drawable drawable) {
120 public int getAlpha(Drawable drawable) {
125 public void applyTheme(Drawable drawable, Resources.Theme t) {
129 public boolean canApplyTheme(Drawable drawable) {
134 public ColorFilter getColorFilter(Drawable drawable) {
139 public void clearColorFilter(Drawable drawable) {
144 public void inflate(Drawable drawable, Resources res, XmlPullParser parser,
156 public void jumpToCurrentState(Drawable drawable) {
161 public Drawable wrap(Drawable drawable) {
168 public boolean setLayoutDirection(Drawable drawable, int layoutDirection) {
173 public int getLayoutDirection(Drawable drawable) {
184 public void setAutoMirrored(Drawable drawable, boolean mirrored) {
189 public boolean isAutoMirrored(Drawable drawable) {
194 public Drawable wrap(Drawable drawable) {
199 public int getAlpha(Drawable drawable) {
209 public void setHotspot(Drawable drawable, float x, float y) {
214 public void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom) {
219 public void setTint(Drawable drawable, int tint) {
224 public void setTintList(Drawable drawable, ColorStateList tint) {
229 public void setTintMode(Drawable drawable, PorterDuff.Mode tintMode) {
234 public Drawable wrap(Drawable drawable) {
239 public void applyTheme(Drawable drawable, Resources.Theme t) {
244 public boolean canApplyTheme(Drawable drawable) {
249 public ColorFilter getColorFilter(Drawable drawable) {
254 public void clearColorFilter(Drawable drawable) {
259 public void inflate(Drawable drawable, Resources res, XmlPullParser parser,
271 public boolean setLayoutDirection(Drawable drawable, int layoutDirection) {
276 public int getLayoutDirection(Drawable drawable) {
281 public Drawable wrap(Drawable drawable) {
287 public void clearColorFilter(Drawable drawable) {
315 * Call {@link Drawable#jumpToCurrentState() Drawable.jumpToCurrentState()}.
320 * @param drawable The Drawable against which to invoke the method.
322 public static void jumpToCurrentState(@NonNull Drawable drawable) {
327 * Set whether this Drawable is automatically mirrored when its layout
334 * @param drawable The Drawable against which to invoke the method.
335 * @param mirrored Set to true if the Drawable should be mirrored, false if
338 public static void setAutoMirrored(@NonNull Drawable drawable, boolean mirrored) {
343 * Tells if this Drawable will be automatically mirrored when its layout
349 * @param drawable The Drawable against which to invoke the method.
350 * @return boolean Returns true if this Drawable will be automatically
353 public static boolean isAutoMirrored(@NonNull Drawable drawable) {
360 * @param drawable The Drawable against which to invoke the method.
364 public static void setHotspot(@NonNull Drawable drawable, float x, float y) {
372 * @param drawable The Drawable against which to invoke the method.
374 public static void setHotspotBounds(@NonNull Drawable drawable, int left, int top,
382 * @param drawable The Drawable against which to invoke the method.
385 public static void setTint(@NonNull Drawable drawable, @ColorInt int tint) {
392 * @param drawable The Drawable against which to invoke the method.
395 public static void setTintList(@NonNull Drawable drawable, @Nullable ColorStateList tint) {
402 * @param drawable The Drawable against which to invoke the method.
405 public static void setTintMode(@NonNull Drawable drawable, @Nullable PorterDuff.Mode tintMode) {
413 * @param drawable The Drawable against which to invoke the method.
415 public static int getAlpha(@NonNull Drawable drawable) {
420 * Applies the specified theme to this Drawable and its children.
422 public static void applyTheme(@NonNull Drawable drawable, @NonNull Resources.Theme t) {
427 * Whether a theme can be applied to this Drawable and its children.
429 public static boolean canApplyTheme(@NonNull Drawable drawable) {
438 public static ColorFilter getColorFilter(@NonNull Drawable drawable) {
445 public static void clearColorFilter(@NonNull Drawable drawable) {
450 * Inflate this Drawable from an XML resource optionally styled by a theme.
453 * @param parser XML parser from which to inflate this Drawable
459 public static void inflate(@NonNull Drawable drawable, @NonNull Resources res,
478 * Drawable bg = DrawableCompat.wrap(view.getBackground());
486 * <p>If you need to get hold of the original {@link android.graphics.drawable.Drawable} again,
487 * you can use the value returned from {@link #unwrap(Drawable)}.</p>
489 * @param drawable The Drawable to process
492 * @see #setTint(Drawable, int)
493 * @see #setTintList(Drawable, ColorStateList)
494 * @see #setTintMode(Drawable, PorterDuff.Mode)
495 * @see #unwrap(Drawable)
497 public static Drawable wrap(@NonNull Drawable drawable) {
502 * Unwrap {@code drawable} if it is the result of a call to {@link #wrap(Drawable)}. If
503 * the {@code drawable} is not the result of a call to {@link #wrap(Drawable)} then
507 * @return the unwrapped {@link Drawable} or {@code drawable} if it hasn't been wrapped.
509 * @see #wrap(Drawable)
511 public static <T extends Drawable> T unwrap(@NonNull Drawable drawable) {
520 * layout direction, as the Drawable has no capacity to do the resolution on
529 * @see #getLayoutDirection(Drawable)
531 public static boolean setLayoutDirection(@NonNull Drawable drawable, int layoutDirection) {
536 * Returns the resolved layout direction for this Drawable.
540 * @see #setLayoutDirection(Drawable, int)
542 public static int getLayoutDirection(@NonNull Drawable drawable) {