android.support.wearable.view
Class CrossfadeDrawable
java.lang.Object
Drawable
android.support.wearable.view.CrossfadeDrawable
public class CrossfadeDrawable
- extends Drawable
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.
- See Also:
setBase(Drawable),
setFading(Drawable),
setProgress(float)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrossfadeDrawable
public CrossfadeDrawable()
setFading
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.
setBase
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.
setProgress
public void setProgress(float progress)
draw
public void draw(Canvas canvas)
getIntrinsicWidth
public int getIntrinsicWidth()
getIntrinsicHeight
public int getIntrinsicHeight()
onBoundsChange
protected void onBoundsChange(Rect bounds)
jumpToCurrentState
public void jumpToCurrentState()
setChangingConfigurations
public void setChangingConfigurations(int configs)
setFilterBitmap
public void setFilterBitmap(boolean filter)
setDither
public void setDither(boolean dither)
setColorFilter
public void setColorFilter(ColorFilter cf)
setColorFilter
public void setColorFilter(int color,
Mode mode)
clearColorFilter
public void clearColorFilter()
getChangingConfigurations
public int getChangingConfigurations()
onStateChange
protected boolean onStateChange(int[] state)
onLevelChange
protected boolean onLevelChange(int level)
isStateful
public boolean isStateful()
getAlpha
public int getAlpha()
setAlpha
public void setAlpha(int alpha)
getOpacity
public int getOpacity()
invalidateDrawable
public void invalidateDrawable(Drawable who)
scheduleDrawable
public void scheduleDrawable(Drawable who,
java.lang.Runnable what,
long when)
unscheduleDrawable
public void unscheduleDrawable(Drawable who,
java.lang.Runnable what)