ActivityCompat
open class ActivityCompat : ContextCompat
kotlin.Any | ||
↳ | androidx.core.content.ContextCompat | |
↳ | androidx.core.app.ActivityCompat |
Helper for accessing features in android.app.Activity
.
Summary
Nested classes | |
---|---|
abstract |
This interface is the contract for receiving the results for permission requests. |
abstract |
Customizable delegate that allows delegating permission compatibility methods to a custom implementation. |
Protected constructors | |
---|---|
<init>() This class should not be instantiated, but the constructor must be visible for the class to be extended (as in support-v13). |
Public methods | |
---|---|
open static Unit |
finishAffinity(@NonNull activity: Activity) Finish this activity, and tries to finish all activities immediately below it in the current task that have the same affinity. |
open static Unit |
finishAfterTransition(@NonNull activity: Activity) Reverses the Activity Scene entry Transition and triggers the calling Activity to reverse its exit Transition. |
open static Uri? |
getReferrer(@NonNull activity: Activity) Return information about who launched this activity. |
open static Boolean |
invalidateOptionsMenu(activity: Activity!) Invalidate the activity's options menu, if able. |
open static Unit |
postponeEnterTransition(@NonNull activity: Activity) |
open static Unit |
Cause the given Activity to be recreated with a new instance. |
open static DragAndDropPermissionsCompat? |
requestDragAndDropPermissions(activity: Activity!, dragEvent: DragEvent!) Create |
open static Unit |
requestPermissions(@NonNull activity: Activity, @NonNull permissions: Array<String!>, @IntRange(0) requestCode: Int) Requests permissions to be granted to this application. |
open static T |
requireViewById(@NonNull activity: Activity, @IdRes id: Int) Finds a view that was identified by the |
open static Unit |
setEnterSharedElementCallback(@NonNull : Activity, @Nullable : SharedElementCallback?) When |
open static Unit |
setExitSharedElementCallback(@NonNull : Activity, @Nullable : SharedElementCallback?) When |
open static Unit |
setLocusContext(@NonNull activity: Activity, @Nullable locusId: LocusIdCompat?, @Nullable bundle: Bundle?) Sets the |
open static Unit |
setPermissionCompatDelegate(@Nullable delegate: ActivityCompat.PermissionCompatDelegate?) Sets the permission delegate for |
open static Boolean |
shouldShowRequestPermissionRationale(@NonNull activity: Activity, @NonNull permission: String) Gets whether you should show UI with rationale before requesting a permission. |
open static Unit |
startActivityForResult(@NonNull activity: Activity, @NonNull intent: |