Lines Matching refs:drawable

17 package android.support.v4.graphics.drawable;
21 import android.graphics.drawable.Drawable;
25 * Helper for accessing features in {@link android.graphics.drawable.Drawable}
33 void jumpToCurrentState(Drawable drawable);
34 void setAutoMirrored(Drawable drawable, boolean mirrored);
35 boolean isAutoMirrored(Drawable drawable);
36 void setHotspot(Drawable drawable, float x, float y);
37 void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom);
38 void setTint(Drawable drawable, int tint);
39 void setTintList(Drawable drawable, ColorStateList tint);
40 void setTintMode(Drawable drawable, PorterDuff.Mode tintMode);
41 Drawable wrap(Drawable drawable);
42 void setLayoutDirection(Drawable drawable, int layoutDirection);
43 int getLayoutDirection(Drawable drawable);
51 public void jumpToCurrentState(Drawable drawable) {
55 public void setAutoMirrored(Drawable drawable, boolean mirrored) {
59 public boolean isAutoMirrored(Drawable drawable) {
64 public void setHotspot(Drawable drawable, float x, float y) {
68 public void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom) {
72 public void setTint(Drawable drawable, int tint) {
73 DrawableCompatBase.setTint(drawable, tint);
77 public void setTintList(Drawable drawable, ColorStateList tint) {
78 DrawableCompatBase.setTintList(drawable, tint);
82 public void setTintMode(Drawable drawable, PorterDuff.Mode tintMode) {
83 DrawableCompatBase.setTintMode(drawable, tintMode);
87 public Drawable wrap(Drawable drawable) {
88 return DrawableCompatBase.wrapForTinting(drawable);
92 public void setLayoutDirection(Drawable drawable, int layoutDirection) {
97 public int getLayoutDirection(Drawable drawable) {
107 public void jumpToCurrentState(Drawable drawable) {
108 DrawableCompatHoneycomb.jumpToCurrentState(drawable);
112 public Drawable wrap(Drawable drawable) {
113 return DrawableCompatHoneycomb.wrapForTinting(drawable);
119 public void setLayoutDirection(Drawable drawable, int layoutDirection) {
120 DrawableCompatJellybeanMr1.setLayoutDirection(drawable, layoutDirection);
124 public int getLayoutDirection(Drawable drawable) {
125 final int dir = DrawableCompatJellybeanMr1.getLayoutDirection(drawable);
135 public void setAutoMirrored(Drawable drawable, boolean mirrored) {
136 DrawableCompatKitKat.setAutoMirrored(drawable, mirrored);
140 public boolean isAutoMirrored(Drawable drawable) {
141 return DrawableCompatKitKat.isAutoMirrored(drawable);
145 public Drawable wrap(Drawable drawable) {
146 return DrawableCompatKitKat.wrapForTinting(drawable);
155 public void setHotspot(Drawable drawable, float x, float y) {
156 DrawableCompatLollipop.setHotspot(drawable, x, y);
160 public void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom) {
161 DrawableCompatLollipop.setHotspotBounds(drawable, left, top, right, bottom);
165 public void setTint(Drawable drawable, int tint) {
166 DrawableCompatLollipop.setTint(drawable, tint);
170 public void setTintList(Drawable drawable, ColorStateList tint) {
171 DrawableCompatLollipop.setTintList(drawable, tint);
175 public void setTintMode(Drawable drawable, PorterDuff.Mode tintMode) {
176 DrawableCompatLollipop.setTintMode(drawable, tintMode);
180 public Drawable wrap(Drawable drawable) {
181 return DrawableCompatLollipop.wrapForTinting(drawable);
190 public Drawable wrap(Drawable drawable) {
191 return DrawableCompatApi22.wrapForTinting(drawable);
200 public void setLayoutDirection(Drawable drawable, int layoutDirection) {
201 DrawableCompatApi23.setLayoutDirection(drawable, layoutDirection);
205 public int getLayoutDirection(Drawable drawable) {
206 return DrawableCompatApi23.getLayoutDirection(drawable);
239 * @param drawable The Drawable against which to invoke the method.
241 public static void jumpToCurrentState(Drawable drawable) {
242 IMPL.jumpToCurrentState(drawable);
253 * @param drawable The Drawable against which to invoke the method.
257 public static void setAutoMirrored(Drawable drawable, boolean mirrored) {
258 IMPL.setAutoMirrored(drawable, mirrored);
268 * @param drawable The Drawable against which to invoke the method.
272 public static boolean isAutoMirrored(Drawable drawable) {
273 return IMPL.isAutoMirrored(drawable);
277 * Specifies the hotspot's location within the drawable.
279 * @param drawable The Drawable against which to invoke the method.
283 public static void setHotspot(Drawable drawable, float x, float y) {
284 IMPL.setHotspot(drawable, x, y);
289 * different from the drawable bounds.
291 * @param drawable The Drawable against which to invoke the method.
293 public static void setHotspotBounds(Drawable drawable, int left, int top,
295 IMPL.setHotspotBounds(drawable, left, top, right, bottom);
299 * Specifies a tint for {@code drawable}.
301 * @param drawable The Drawable against which to invoke the method.
302 * @param tint Color to use for tinting this drawable
304 public static void setTint(Drawable drawable, int tint) {
305 IMPL.setTint(drawable, tint);
309 * Specifies a tint for {@code drawable} as a color state list.
311 * @param drawable The Drawable against which to invoke the method.
312 * @param tint Color state list to use for tinting this drawable, or null to clear the tint
314 public static void setTintList(Drawable drawable, ColorStateList tint) {
315 IMPL.setTintList(drawable, tint);
319 * Specifies a tint blending mode for {@code drawable}.
321 * @param drawable The Drawable against which to invoke the method.
324 public static void setTintMode(Drawable drawable, PorterDuff.Mode tintMode) {
325 IMPL.setTintMode(drawable, tintMode);
329 * Potentially wrap {@code drawable} so that it may be used for tinting across the
332 * If you need to get hold of the original {@link android.graphics.drawable.Drawable} again,
335 * @param drawable The Drawable to process
336 * @return A drawable capable of being tinted across all API levels.
343 public static Drawable wrap(Drawable drawable) {
344 return IMPL.wrap(drawable);
348 * Unwrap {@code drawable} if it is the result of a call to {@link #wrap(Drawable)}. If
349 * the {@code drawable} is not the result of a call to {@link #wrap(Drawable)} then
350 * {@code drawable} is returned as-is.
352 * @param drawable The drawable to unwrap
353 * @return the unwrapped {@link Drawable} or {@code drawable} if it hasn't been wrapped.
357 public static <T extends Drawable> T unwrap(Drawable drawable) {
358 if (drawable instanceof DrawableWrapper) {
359 return (T) ((DrawableWrapper) drawable).getWrappedDrawable();
361 return (T) drawable;
365 * Set the layout direction for this drawable. Should be a resolved
369 * @param layoutDirection the resolved layout direction for the drawable,
374 public static void setLayoutDirection(Drawable drawable, int layoutDirection) {
375 IMPL.setLayoutDirection(drawable, layoutDirection);
385 public static int getLayoutDirection(Drawable drawable) {
386 return IMPL.getLayoutDirection(drawable);