public class CrossFadeDrawable
extends android.graphics.drawable.Drawable
| Constructor and Description |
|---|
CrossFadeDrawable(android.graphics.Bitmap start,
android.graphics.Bitmap end) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(android.graphics.Canvas canvas) |
android.graphics.Bitmap |
getEnd() |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getMinimumHeight() |
int |
getMinimumWidth() |
int |
getOpacity() |
android.widget.ImageView.ScaleType |
getScaleType() |
android.graphics.Bitmap |
getStart() |
void |
resetTransition()
Show only the first layer.
|
void |
reverseTransition(int duration)
Reverses the transition, picking up where the transition currently is.
|
void |
setAlpha(int alpha)
Ignored.
|
void |
setBounds(int left,
int top,
int right,
int bottom) |
void |
setColorFilter(android.graphics.ColorFilter cf) |
void |
setCrossFadeEnabled(boolean enabled)
Enables or disables the cross fade of the drawables.
|
void |
setDither(boolean dither) |
void |
setEnd(android.graphics.Bitmap end) |
void |
setFilterBitmap(boolean filter) |
void |
setScaleType(android.widget.ImageView.ScaleType scaleType)
Set the
ImageView.ScaleType. |
void |
setStart(android.graphics.Bitmap start) |
void |
startTransition(int durationMillis)
Begin the second layer on top of the first layer.
|
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getChangingConfigurations, getConstantState, getCurrent, getLevel, getPadding, getState, getTransparentRegion, inflate, invalidateSelf, isStateful, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setBounds, setCallback, setChangingConfigurations, setColorFilter, setLevel, setState, setVisible, unscheduleSelfpublic CrossFadeDrawable(android.graphics.Bitmap start,
android.graphics.Bitmap end)
public void startTransition(int durationMillis)
durationMillis - The length of the transition in millisecondspublic void resetTransition()
public void reverseTransition(int duration)
duration - The duration to use if no transition is running.public void draw(android.graphics.Canvas canvas)
draw in class android.graphics.drawable.Drawablepublic android.graphics.Bitmap getStart()
public void setStart(android.graphics.Bitmap start)
public android.graphics.Bitmap getEnd()
public void setEnd(android.graphics.Bitmap end)
public void setBounds(int left,
int top,
int right,
int bottom)
setBounds in class android.graphics.drawable.Drawablepublic int getIntrinsicWidth()
getIntrinsicWidth in class android.graphics.drawable.Drawablepublic int getIntrinsicHeight()
getIntrinsicHeight in class android.graphics.drawable.Drawablepublic int getMinimumWidth()
getMinimumWidth in class android.graphics.drawable.Drawablepublic int getMinimumHeight()
getMinimumHeight in class android.graphics.drawable.Drawablepublic void setDither(boolean dither)
setDither in class android.graphics.drawable.Drawablepublic void setFilterBitmap(boolean filter)
setFilterBitmap in class android.graphics.drawable.Drawablepublic void setAlpha(int alpha)
setAlpha in class android.graphics.drawable.Drawablepublic void setColorFilter(android.graphics.ColorFilter cf)
setColorFilter in class android.graphics.drawable.Drawablepublic int getOpacity()
getOpacity in class android.graphics.drawable.Drawablepublic void setCrossFadeEnabled(boolean enabled)
enabled - True to enable cross fading, false otherwise.public android.widget.ImageView.ScaleType getScaleType()
#setScaleType(ScaleType)public void setScaleType(android.widget.ImageView.ScaleType scaleType)
ImageView.ScaleType. The drawable will draw itself according this
scaletypescaleType - Copyright © 2015 Hannes Dorfmann. All rights reserved.