public class

CrossfadeDrawable

extends Drawable
implements Drawable.Callback

Note: The Wearable Support Library classes under the android.support.wearable package are subject to change. For the full Android API reference, see Reference.

java.lang.Object
   ↳ android.graphics.drawable.Drawable
     ↳ android.support.wearable.view.CrossfadeDrawable

Class Overview

Contains two child drawables and provides methods to directly adjust the blend between the two.

The base layer is always painted fully opaque, and the fading layer is adjusted according to the current progress value.

Summary

Public Constructors
CrossfadeDrawable()
Public Methods
void clearColorFilter()
void draw(Canvas canvas)
int getAlpha()
int getChangingConfigurations()
int getIntrinsicHeight()
int getIntrinsicWidth()
int getOpacity()
void invalidateDrawable(Drawable who)
boolean isStateful()
void jumpToCurrentState()
void scheduleDrawable(Drawable who, Runnable what, long when)
void setAlpha(int alpha)
void setBase(Drawable d)
Sets the image for the base layer.
void setChangingConfigurations(int configs)
void setColorFilter(ColorFilter cf)
void setColorFilter(int color, PorterDuff.Mode mode)
void setDither(boolean dither)
void setFading(Drawable d)
Sets the image for the fading layer.
void setFilterBitmap(boolean filter)
void setProgress(float progress)
void unscheduleDrawable(Drawable who, Runnable what)
Protected Methods
Drawable getBase()
Drawable getFading()
void onBoundsChange(Rect bounds)
boolean onLevelChange(int level)
boolean onStateChange(int[] state)
[Expand]
Inherited Methods
From class android.graphics.drawable.Drawable
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback

Public Constructors

public CrossfadeDrawable ()

Public Methods

public void clearColorFilter ()

public void draw (Canvas canvas)

public int getAlpha ()

public int getChangingConfigurations ()

public int getIntrinsicHeight ()

public int getIntrinsicWidth ()

public int getOpacity ()

public void invalidateDrawable (Drawable who)

public boolean isStateful ()

public void jumpToCurrentState ()

public void scheduleDrawable (Drawable who, Runnable what, long when)

public void setAlpha (int alpha)

public void setBase (Drawable d)

Sets the image for the base layer. This drawable's opacity remains fixed. It's fully visible when progress == 0, and completely obscured when progress == 1.

public void setChangingConfigurations (int configs)

public void setColorFilter (ColorFilter cf)

public void setColorFilter (int color, PorterDuff.Mode mode)

public void setDither (boolean dither)

public void setFading (Drawable d)

Sets the image for the fading layer. This drawable's opacity will vary directly proportionally to the progress value. It's invisible when progress == 0 and fully opaque when progress == 1.

public void setFilterBitmap (boolean filter)

public void setProgress (float progress)

public void unscheduleDrawable (Drawable who, Runnable what)

Protected Methods

protected Drawable getBase ()

protected Drawable getFading ()

protected void onBoundsChange (Rect bounds)

protected boolean onLevelChange (int level)

protected boolean onStateChange (int[] state)