AI-generated Key Takeaways
-
ActivityTransition
represents an activity and its transition, like starting to walk or stopping running. -
It uses constants like
ACTIVITY_TRANSITION_ENTER
andACTIVITY_TRANSITION_EXIT
to define transitions. -
You can get the activity type and transition type using methods like
getActivityType()
andgetTransitionType()
. -
ActivityTransition
objects are Parcelable, meaning they can be easily passed between components. -
A builder class,
ActivityTransition.Builder
, is available for creatingActivityTransition
objects.
Represents an activity and the transition of it. For instance start to walk; stop running etc.
Nested Class Summary
class | ActivityTransition.Builder | The builder to help create an ActivityTransition
object. |
|
@interface | ActivityTransition.SupportedActivityTransition | Activity transition constants annotation. |
Constant Summary
int | ACTIVITY_TRANSITION_ENTER | User enters the given activity. |
int | ACTIVITY_TRANSITION_EXIT | User exits the given activity. |
Inherited Constant Summary
Field Summary
public static final Creator<ActivityTransition> | CREATOR |
Public Method Summary
boolean | |
int |
getActivityType()
Gets the type of the activity to be detected.
|
int |
getTransitionType()
Gets the interested transition type.
|
int |
hashCode()
|
String |
toString()
|
void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Constants
public static final int ACTIVITY_TRANSITION_ENTER
User enters the given activity.
public static final int ACTIVITY_TRANSITION_EXIT
User exits the given activity.
Fields
public static final Creator<ActivityTransition> CREATOR
Public Methods
public boolean equals (Object object)
public int getActivityType ()
Gets the type of the activity to be detected.
public int getTransitionType ()
Gets the interested transition type. It's one of the ACTIVITY_TRANSITION_xxx constants.