public class BasicWindowTransition extends Object implements WindowTransition
WindowTransition that may be used to create basic instances of window
transitions to animate window changes.| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<BasicWindowTransition> |
CREATOR
Creator used to create an instance or array of instances of BasicWindowTransition from
Parcel. |
NO_ANIMATION| Modifier | Constructor and Description |
|---|---|
|
BasicWindowTransition(int enterAnim,
int exitAnim)
Same as
BasicWindowTransition(int, int, int, int) finish animations set to
WindowTransition.NO_ANIMATION. |
|
BasicWindowTransition(int startEnterAnim,
int startExitAnim,
int finishEnterAnim,
int finishExitAnim)
Same as
BasicWindowTransition(int, int, int, int, String) with name specified
as "UNKNOWN". |
|
BasicWindowTransition(int startEnterAnim,
int startExitAnim,
int finishEnterAnim,
int finishExitAnim,
String name)
Creates a new instance of BasicWindowTransition with the specified animations and name.
|
protected |
BasicWindowTransition(android.os.Parcel source)
Called form
CREATOR to create an instance of WindowTransition form the given parcel
source. |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
int |
getFinishEnterAnimation()
Returns the animation resource for an old entering/resuming window used in
WindowTransition.overrideFinish(Activity)
as enter animation. |
int |
getFinishExitAnimation()
Returns the animation resource for the current exiting/finishing window used in
WindowTransition.overrideFinish(Activity)
as exit animation. |
String |
getName()
Returns the name of this window transition.
|
int |
getStartEnterAnimation()
Returns the animation resource for a new entering/starting window used in
WindowTransition.overrideStart(Activity)
as enter animation. |
int |
getStartExitAnimation()
Returns the animation resource for the current exiting/pausing window used in
WindowTransition.overrideStart(Activity)
as exit animation. |
void |
overrideFinish(android.app.Activity activity)
Overrides pending transitions of the specified activity using
WindowTransition.getFinishEnterAnimation()
and WindowTransition.getFinishExitAnimation() animations specified for this window transition. |
void |
overrideStart(android.app.Activity activity)
Overrides pending transitions of the specified activity using
WindowTransition.getStartEnterAnimation()
and WindowTransition.getStartExitAnimation() animations specified for this window transition. |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<BasicWindowTransition> CREATOR
Parcel.public BasicWindowTransition(int enterAnim,
int exitAnim)
BasicWindowTransition(int, int, int, int) finish animations set to
WindowTransition.NO_ANIMATION.public BasicWindowTransition(int startEnterAnim,
int startExitAnim,
int finishEnterAnim,
int finishExitAnim)
BasicWindowTransition(int, int, int, int, String) with name specified
as "UNKNOWN".public BasicWindowTransition(int startEnterAnim,
int startExitAnim,
int finishEnterAnim,
int finishExitAnim,
String name)
startEnterAnim - A resource id of the animation for an entering window.startExitAnim - A resource id of the animation for an exiting window to be added to the
back stack (if).finishEnterAnim - A resource id of the animation for an entering window to be showed from
the back stack.finishExitAnim - A resource id of the animation for an exiting window to be destroyed and
replaced by the entering one.name - Name for the new transition.overrideStart(Activity),
overrideFinish(Activity)protected BasicWindowTransition(android.os.Parcel source)
CREATOR to create an instance of WindowTransition form the given parcel
source.source - Parcel with data for the new instance.public void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int describeContents()
describeContents in interface android.os.Parcelablepublic int getStartEnterAnimation()
WindowTransitionWindowTransition.overrideStart(Activity)
as enter animation.getStartEnterAnimation in interface WindowTransitionWindowTransition.NO_ANIMATION if no animation should be played for
entering activity window.public int getStartExitAnimation()
WindowTransitionWindowTransition.overrideStart(Activity)
as exit animation.getStartExitAnimation in interface WindowTransitionWindowTransition.NO_ANIMATION if no animation should be played for
exiting activity window.public int getFinishEnterAnimation()
WindowTransitionWindowTransition.overrideFinish(Activity)
as enter animation.getFinishEnterAnimation in interface WindowTransitionWindowTransition.NO_ANIMATION if no animation should be played for
entering back-stacked activity window.public int getFinishExitAnimation()
WindowTransitionWindowTransition.overrideFinish(Activity)
as exit animation.getFinishExitAnimation in interface WindowTransitionWindowTransition.NO_ANIMATION if no animation should be played for
exiting back-stacked activity window.public String getName()
WindowTransitiongetName in interface WindowTransitionpublic void overrideStart(android.app.Activity activity)
WindowTransitionWindowTransition.getStartEnterAnimation()
and WindowTransition.getStartExitAnimation() animations specified for this window transition.
This method may be called to override default start animations when starting a new activity.
The specified activity can be either a caller activity that starts a new activity via Intent
or the started activity. In the first case this should be called immediately after
Activity.startActivity(Intent) has been called. In the second case this method should
be called from within Activity.onStart() of the started activity.
overrideStart in interface WindowTransitionactivity - The caller or starting activity of which pending transition to override.WindowTransition.overrideFinish(Activity)public void overrideFinish(android.app.Activity activity)
WindowTransitionWindowTransition.getFinishEnterAnimation()
and WindowTransition.getFinishExitAnimation() animations specified for this window transition.
This method may be called to override default finish animations when finishing currently visible
activity from within Activity.finish() method.
overrideFinish in interface WindowTransitionactivity - The finishing activity of which pending transition to override.WindowTransition.overrideStart(Activity)