ActivityTransition
Stay organized with collections
Save and categorize content based on your preferences.
Represents an activity and the transition of it. For instance start to walk; stop running
etc.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
boolean |
|
int |
|
int |
|
int |
|
String
|
|
void |
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
From interface android.os.Parcelable
abstract int |
describeContents()
|
abstract void |
writeToParcel( Parcel arg0,
int arg1)
|
Constants
public static final int
ACTIVITY_TRANSITION_ENTER
User enters the given activity.
Constant Value: 0
public static final int
ACTIVITY_TRANSITION_EXIT
User exits the given activity.
Constant Value: 1
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.
public void writeToParcel (Parcel dest, int
flags)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eActivityTransition\u003c/code\u003e represents an activity and its transition, like starting to walk or stopping running.\u003c/p\u003e\n"],["\u003cp\u003eIt uses constants like \u003ccode\u003eACTIVITY_TRANSITION_ENTER\u003c/code\u003e and \u003ccode\u003eACTIVITY_TRANSITION_EXIT\u003c/code\u003e to define transitions.\u003c/p\u003e\n"],["\u003cp\u003eYou can get the activity type and transition type using methods like \u003ccode\u003egetActivityType()\u003c/code\u003e and \u003ccode\u003egetTransitionType()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eActivityTransition\u003c/code\u003e objects are Parcelable, meaning they can be easily passed between components.\u003c/p\u003e\n"],["\u003cp\u003eA builder class, \u003ccode\u003eActivityTransition.Builder\u003c/code\u003e, is available for creating \u003ccode\u003eActivityTransition\u003c/code\u003e objects.\u003c/p\u003e\n"]]],[],null,["# ActivityTransition\n\npublic class **ActivityTransition** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nRepresents an activity and the transition of it. For instance start to walk; stop running\netc. \n\n### Nested Class Summary\n\n|------------|---|---|-----------------------------------------------------------------------------------------------------------------------------------|\n| class | [ActivityTransition.Builder](/android/reference/com/google/android/gms/location/ActivityTransition.Builder) || The builder to help create an [ActivityTransition](/android/reference/com/google/android/gms/location/ActivityTransition) object. |\n| @interface | [ActivityTransition.SupportedActivityTransition](/android/reference/com/google/android/gms/location/ActivityTransition.SupportedActivityTransition) || Activity transition constants annotation. |\n\n### Constant Summary\n\n|-----|------------------------------------------------------------------------------------------------------------------------------|---------------------------------|\n| int | [ACTIVITY_TRANSITION_ENTER](/android/reference/com/google/android/gms/location/ActivityTransition#ACTIVITY_TRANSITION_ENTER) | User enters the given activity. |\n| int | [ACTIVITY_TRANSITION_EXIT](/android/reference/com/google/android/gms/location/ActivityTransition#ACTIVITY_TRANSITION_EXIT) | User exits the given activity. |\n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Field Summary\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|---|\n| public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[ActivityTransition](/android/reference/com/google/android/gms/location/ActivityTransition)\\\u003e | [CREATOR](/android/reference/com/google/android/gms/location/ActivityTransition#CREATOR) | |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/android/gms/location/ActivityTransition#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) object) |\n| int | [getActivityType](/android/reference/com/google/android/gms/location/ActivityTransition#getActivityType())() Gets the type of the activity to be detected. |\n| int | [getTransitionType](/android/reference/com/google/android/gms/location/ActivityTransition#getTransitionType())() Gets the interested transition type. |\n| int | [hashCode](/android/reference/com/google/android/gms/location/ActivityTransition#hashCode())() |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/android/gms/location/ActivityTransition#toString())() |\n| void | [writeToParcel](/android/reference/com/google/android/gms/location/ActivityTransition#writeToParcel(android.os.Parcel,%20int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags) |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nConstants\n---------\n\n#### public static final int\n**ACTIVITY_TRANSITION_ENTER**\n\nUser enters the given activity. \nConstant Value: 0 \n\n#### public static final int\n**ACTIVITY_TRANSITION_EXIT**\n\nUser exits the given activity. \nConstant Value: 1\n\nFields\n------\n\n#### public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[ActivityTransition](/android/reference/com/google/android/gms/location/ActivityTransition)\\\u003e\n**CREATOR**\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) object)\n\n#### public int **getActivityType** ()\n\nGets the type of the activity to be detected. \n\n#### public int **getTransitionType** ()\n\nGets the interested transition type. It's one of the ACTIVITY_TRANSITION_xxx\nconstants. \n\n#### public int **hashCode** ()\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()\n\n#### public void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags)"]]