{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

FragmentActivity

Added in 1.1.0

class FragmentActivity : ComponentActivity, ActivityCompat.OnRequestPermissionsResultCallback, ActivityCompat.RequestPermissionsRequestCodeValidator

kotlin.Any
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ androidx.core.app.ComponentActivity
             ↳ androidx.activity.ComponentActivity
               ↳ androidx.fragment.app.FragmentActivity

Base class for activities that want to use the support-based Fragments.

Known limitations:

Summary

Public constructors

Default constructor for FragmentActivity.

Alternate constructor that can be used to provide a default layout that will be inflated as part of super.onCreate(savedInstanceState).

Public functions

Unit
dump(
    prefix: String,
    fd: FileDescriptor?,
    writer: PrintWriter,
    args: Array<String!>?
)

Print the Activity's state into the given stream.

FragmentManager

Return the FragmentManager for interacting with fragments associated with this activity.

LoaderManager

This function is deprecated.

Use LoaderManager.getInstance(this).

Unit

This function is deprecated.

The responsibility for listening for fragments being attached has been moved to FragmentManager.

View?
onCreateView(name: String, context: Context, attrs: AttributeSet)
View?
onCreateView(
    parent: View?,
    name: String,
    context: Context,
    attrs: AttributeSet
)
Boolean
onMenuItemSelected(featureId: Int, item: MenuItem)
Unit
@CallSuper
onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String!>,
    grantResults: IntArray
)

This function is deprecated.

Unit

Hook in to note that fragment state is no longer saved.

Unit

When makeSceneTransitionAnimation was used to start an Activity, callback will be called to handle shared elements on the launched Activity.

Unit

When makeSceneTransitionAnimation was used to start an Activity, listener will be called to handle shared elements on the launching Activity.

Unit
startActivityFromFragment(
    fragment: Fragment,
    intent: Intent,
    requestCode: Int
)

Called by Fragment.startActivityForResult() to implement its behavior.

Unit
startActivityFromFragment(
    fragment: Fragment,
    intent: Intent,
    requestCode: Int,
    options: Bundle?
)

Called by Fragment.startActivityForResult() to implement its behavior.

Unit
startIntentSenderFromFragment(
    fragment: Fragment,
    intent: IntentSender,
    requestCode: Int,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int,
    options: Bundle?
)

This function is deprecated.

Fragments should use registerForActivityResult with the StartIntentSenderForResult contract.

Unit

Reverses the Activity Scene entry Transition and triggers the calling Activity to reverse its exit Transition.

Unit

This function is deprecated.

Call invalidateOptionsMenu directly.

Unit

Support library version of postponeEnterTransition that works only on API 21 and later.

Unit

Support library version of startPostponedEnterTransition that only works with API 21 and later.

Unit

This function is deprecated.

there are no longer any restrictions on permissions requestCodes.

Protected functions

Unit
@CallSuper
onActivityResult(requestCode: Int, resultCode: Int, data: Intent?)

This function is deprecated.

Unit
onCreate(savedInstanceState: Bundle?)

Perform initialization of all fragments.

Unit

Destroy all fragments.

Unit

Dispatch onPause() to fragments.

Unit

Dispatch onResume() to fragments.

Unit

Dispatch onResume() to fragments.

Unit

This is the fragment-orientated version of onResume that you can override to perform operations in the Activity at the same point where its fragments are resumed.

Unit

Dispatch onStart() to all fragments.

Unit

Dispatch onStop() to all fragments.

Inherited Constants

From android.content.ComponentCallbacks2

Inherited functions

From android.app.Activity
Boolean
Unit
Boolean
Unit
Unit
ComponentName!
Unit
Boolean
PendingIntent!
createPendingResult(p: Int, p1: Intent!, p2: Int)
Unit

This function is deprecated.

Unit
Unit
Boolean
Boolean
Boolean
Boolean
Unit
dumpInternal(
    p: String!,
    p1: FileDescriptor!,
    p2: PrintWriter!,
    p3: Array<String!>!
)
Unit

This function is deprecated.

Boolean
T!
<T : View?> findViewById(p: Int)
Unit
Unit
Unit

This function is deprecated.

Unit
Unit
Unit
Unit

This function is deprecated.

ActionBar!
ActivityInfo!
ActivityThread!
IBinder!
Application!
IBinder!
AutofillManager.AutofillClient!
ComponentName!
String!
Int
ComponentName!
ContentCaptureManager.ContentCaptureClient!
Scene!
TransitionManager!
View!
FragmentManager!

This function is deprecated.

Intent!
Any!
String!
Int
LayoutInflater!
LoaderManager!

This function is deprecated.

String!
Int
MediaController!
MenuInflater!
Int
OnBackInvokedDispatcher!
Activity!
Intent!
SharedPreferences!
Uri!
Int
SearchEvent!
IBinder!
SplashScreen!
Any!
Int
CharSequence!
Int
VoiceInteractor!
Int
Window!
WindowManager!
Boolean
Unit
Boolean
Boolean

This function is deprecated.

Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Cursor!
managedQuery(p: Uri!, p1: Array<String!>!, p2: String!, p3: String!)

This function is deprecated.

Boolean
Boolean
Boolean

This function is deprecated.

Unit
Unit
Unit
Unit
Unit

This function is deprecated.

Unit
Unit

This function is deprecated.

Unit
Unit
Boolean
Unit
Unit
onCreateContextMenu(
    p: ContextMenu!,
    p1: View!,
    p2: ContextMenu.ContextMenuInfo!
)
CharSequence!
Dialog!

This function is deprecated.

Unit
Boolean
View!
Boolean

This function is deprecated.

Unit
Unit
Boolean
Unit
Boolean
onKeyDown(p: Int, p1: KeyEvent!)
Boolean
Boolean
onKeyMultiple(p: Int, p1: Int, p2: KeyEvent!)
Boolean
Boolean
onKeyUp(p: Int, p1: KeyEvent!)
Unit
Unit
Unit
Boolean
onMenuOpened(p: Int, p1: Menu!)
Unit
Boolean
Boolean

This function is deprecated.

Unit
Boolean
Unit
Unit
onPerformDirectAction(
    p: String!,
    p1: Bundle!,
    p2: CancellationSignal!,
    p3: Consumer<Bundle!>!
)
Boolean
Unit
Unit
Unit

This function is deprecated.

Unit
Boolean
Unit
Unit
Unit
onProvideKeyboardShortcuts(
    p: (Mutable)List<KeyboardShortcutGroup!>!,
    p1: Menu!,
    p2: Int
)
Uri!
Unit
Unit
Boolean
Unit
Unit
Boolean
Boolean
Unit
Unit
Unit

This function is deprecated.

Unit
Unit
Unit
ActionMode!
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Boolean
Unit

This function is deprecated.

DragAndDropPermissions!
Unit
Unit
Boolean

This function is deprecated.

Boolean
T!
<T : View?> requireViewById(p: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit

This function is deprecated.

Unit
Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
Unit
Unit
Unit

This function is deprecated.

Unit
Unit
Unit
Unit
Unit
Unit

This function is deprecated.

Boolean
Unit
Unit
Unit
Unit
Boolean
Boolean
Boolean
Boolean
Unit

This function is deprecated.

Boolean
showDialog(p: Int, p1: Bundle!)

This function is deprecated.

Unit
ActionMode!
Unit
Unit
Unit
startActivityAsCaller(p: Intent!, p1: Bundle!, p2: Boolean, p3: Int)
Unit
Unit
Unit

This function is deprecated.

Unit

This function is deprecated.

Boolean
Unit
startIntentSender(p: IntentSender!, p1: Intent!, p2: Int, p3: Int, p4: Int)
Unit
startIntentSenderForResultInner(
    p: IntentSender!,
    p1: String!,
    p2: Int,
    p3: Intent!,
    p4: Int,
    p5: Int,
    p6: Bundle!
)
Unit
startIntentSenderFromChild(
    p: Activity!,
    p1: IntentSender!,
    p2: Int,
    p3: Intent!,
    p4: Int,
    p5: Int,
    p6: Int
)

This function is deprecated.

Unit
Unit
Unit

This function is deprecated.

Boolean
Unit
Unit
startSearch(p: String!, p1: Boolean, p2: Bundle!, p3: Boolean)
Unit
Unit
Unit

This function is deprecated.

Unit
Unit
Unit
Unit
Unit
Unit
Unit
updateUiTranslationState(
    p: Int,
    p1: TranslationSpec!,
    p2: TranslationSpec!,
    p3: (Mutable)List<AutofillId!>!,
    p4: UiTranslationSpec!
)
From androidx.activity.ComponentActivity
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
ActivityResultRegistry!
CreationExtras!
ViewModelProvider.Factory!
Any!

This function is deprecated.

Lifecycle!
OnBackPressedDispatcher!
SavedStateRegistry!
ViewModelStore!
Unit
Unit

This function is deprecated.

Unit
Boolean
onCreatePanelMenu(featureId: Int, menu: Menu!)
Unit
onMultiWindowModeChanged(isInMultiWindowMode: Boolean)

This function is deprecated.

Unit
onNewIntent(intent: Intent!)
Unit
onPanelClosed(featureId: Int, menu: Menu!)
Unit
onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)

This function is deprecated.

Boolean
onPreparePanel(featureId: Int, view: View!, menu: Menu!)
Any!

This function is deprecated.

Any!
Unit
Unit
onTrimMemory(level: Int)
Context!
ActivityResultLauncher<I!>!
<I, O> registerForActivityResult(
    contract: ActivityResultContract<I!, O!>!,
    registry: ActivityResultRegistry!,
    callback: ActivityResultCallback<O!>!
)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
setContentView(layoutResID: Int)
Unit
startActivityForResult(intent: Intent!, requestCode: Int)

This function is deprecated.

Unit
startIntentSenderForResult(
    intent: IntentSender!,
    requestCode: Int,
    fillInIntent: Intent!,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int
)

This function is deprecated.

From androidx.core.app.ComponentActivity
Boolean
Boolean
T!
<T : ComponentActivity.ExtraData?> getExtraData(extraDataClass: Class<T!>!)

This function is deprecated.

Unit

This function is deprecated.

Boolean
Boolean
From android.content.Context
From android.view.ContextThemeWrapper
From android.content.ContextWrapper
Boolean
bindIsolatedService(
    p: Intent!,
    p1: Int,
    p2: String!,
    p3: Executor!,
    p4: ServiceConnection!
)
Boolean
Boolean
Boolean
Int
Int
IntArray<Int>!
Int
Int
IntArray<Int>!
Int
checkPermission(p: String!, p1: Int, p2: Int)
Int
Int
checkUriPermission(p: Uri!, p1: Int, p2: Int, p3: Int)
IntArray<Int>!
checkUriPermissions(p: (Mutable)List<Uri!>!, p1: Int, p2: Int, p3: Int)
Unit

This function is deprecated.

Context!
Context!
Context!
Context!
Context!
Context!
Context!
Context!
Context!
Context!
Context!
Context!
Context!
Array<String!>!
Boolean
Boolean
Boolean
Unit
Unit
Unit
Unit
Unit
enforcePermission(p: String!, p1: Int, p2: Int, p3: String!)
Unit
enforceUriPermission(p: Uri!, p1: Int, p2: Int, p3: Int, p4: String!)
Array<String!>!
Context!
ApplicationInfo!
AttributionSource!
String!
AutofillOptions!
Context!
String!
File!
ClassLoader!
File!
ContentCaptureOptions!
ContentResolver!
File!
File!
File!
File!
getDir(p: String!, p1: Int)
Display!
DisplayAdjustments!
Int
Display!
File!
Array<File!>!
File!
Array<File!>!
Array<File!>!

This function is deprecated.

File!
File!
IApplicationThread!
Executor!
Looper!
Handler!
File!
File!
Array<File!>!
String!
String!
PackageManager!
String!
String!
ContextParams!
File!
IServiceConnection!
SharedPreferences!
File!
String!
UserHandle!
Int
Drawable!

This function is deprecated.

Int

This function is deprecated.

Int

This function is deprecated.

IBinder!
Unit
grantUriPermission(p: String!, p1: Uri!, p2: Int)
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
FileInputStream!
FileOutputStream!
SQLiteDatabase!
Drawable!

This function is deprecated.

Intent!
Intent!
registerReceiverAsUser(
    p: BroadcastReceiver!,
    p1: UserHandle!,
    p2: IntentFilter!,
    p3: String!,
    p4: Handler!
)
Intent!
registerReceiverForAllUsers(
    p: BroadcastReceiver!,
    p1: IntentFilter!,
    p2: String!,
    p3: Handler!
)
Unit
Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
Unit
Unit
Unit
Unit
sendBroadcastAsUserMultiplePermissions(
    p: Intent!,
    p1: UserHandle!,
    p2: Array<String!>!
)
Unit
Unit
Unit
sendOrderedBroadcastAsUser(
    p: Intent!,
    p1: UserHandle!,
    p2: String!,
    p3: BroadcastReceiver!,
    p4: Handler!,
    p5: Int,
    p6: String!,
    p7: Bundle!
)
Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
sendStickyOrderedBroadcast(
    p: Intent!,
    p1: BroadcastReceiver!,
    p2: Handler!,
    p3: Int,
    p4: String!,
    p5: Bundle!
)

This function is deprecated.

Unit
sendStickyOrderedBroadcastAsUser(
    p: Intent!,
    p1: UserHandle!,
    p2: BroadcastReceiver!,
    p3: Handler!,
    p4: Int,
    p5: String!,
    p6: Bundle!
)

This function is deprecated.

Unit
Unit
Unit
Unit

This function is deprecated.

Int
ComponentName!
ComponentName!
Boolean
ComponentName!
ComponentName!
Boolean
Boolean
Unit
Unit
Unit
Unit
From org.robolectric.internal.bytecode.ShadowedObject
abstract Any!
From android.view.Window.Callback

Inherited properties

From android.app.Activity
From android.content.Context
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static Int
java-static Int
java-static Int
java-static Int

This property is deprecated.

java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int

This property is deprecated.

java-static Int
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static Int
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static Int
java-static Int
java-static Int

This property is deprecated.

java-static Int
java-static Int
java-static Int

This property is deprecated.

java-static Int

This property is deprecated.

java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!

This property is deprecated.

java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static Long
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!

This property is deprecated.

java-static String!
java-static String!
java-static String!
java-static Int
java-static Int

This property is deprecated.

java-static Int
java-static Int
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!

This property is deprecated.

java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!
java-static String!

This property is deprecated.

java-static String!
java-static String!
java-static String!
From android.content.ContextWrapper

Public constructors

FragmentActivity

Added in 1.1.0
FragmentActivity()

Default constructor for FragmentActivity. All Activities must have a default constructor for API 27 and lower devices or when using the default android.app.AppComponentFactory.

FragmentActivity

Added in 1.1.0
@ContentView
FragmentActivity(contentLayoutId: @LayoutRes Int)

Alternate constructor that can be used to provide a default layout that will be inflated as part of super.onCreate(savedInstanceState).

This should generally be called from your constructor that takes no parameters, as is required for API 27 and lower or when using the default android.app.AppComponentFactory.

See also
FragmentActivity

Public functions

dump

Added in 1.7.0-alpha02
fun dump(
    prefix: String,
    fd: FileDescriptor?,
    writer: PrintWriter,
    args: Array<String!>?
): Unit

Print the Activity's state into the given stream. This gets invoked if you run "adb shell dumpsys activity ".

Parameters
prefix: String

Desired prefix to prepend at each line of output.

fd: FileDescriptor?

The raw file descriptor that the dump is being sent to.

writer: PrintWriter

The PrintWriter to which you should dump your state. This will be closed for you after you return.

args: Array<String!>?

additional arguments to the dump request.

getSupportFragmentManager

Added in 1.1.0
fun getSupportFragmentManager(): FragmentManager

Return the FragmentManager for interacting with fragments associated with this activity.

getSupportLoaderManager

Added in 1.1.0
Deprecated in 1.1.0
fun getSupportLoaderManager(): LoaderManager

onAttachFragment

Added in 1.1.0
Deprecated in 1.3.0
@MainThread
fun onAttachFragment(fragment: Fragment): Unit

Called when a fragment is attached to the activity.

This is called after the attached fragment's onAttach and before the attached fragment's onCreate if the fragment has not yet had a previous call to onCreate.

onCreateView

Added in 1.7.0-alpha02
fun onCreateView(name: String, context: Context, attrs: AttributeSet): View?

onCreateView

Added in 1.7.0-alpha02
fun onCreateView(
    parent: View?,
    name: String,
    context: Context,
    attrs: AttributeSet
): View?

onMenuItemSelected

Added in 1.7.0-alpha02
fun onMenuItemSelected(featureId: Int, item: MenuItem): Boolean

onRequestPermissionsResult

Added in 1.7.0-alpha02
@CallSuper
fun onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String!>,
    grantResults: IntArray
): Unit

onStateNotSaved

Added in 1.1.0
fun onStateNotSaved(): Unit

Hook in to note that fragment state is no longer saved.

setEnterSharedElementCallback

Added in 1.1.0
fun setEnterSharedElementCallback(callback: SharedElementCallback?): Unit

When makeSceneTransitionAnimation was used to start an Activity, callback will be called to handle shared elements on the launched Activity. This requires FEATURE_CONTENT_TRANSITIONS.

Parameters
callback: SharedElementCallback?

Used to manipulate shared element transitions on the launched Activity.

setExitSharedElementCallback

Added in 1.1.0
fun setExitSharedElementCallback(listener: SharedElementCallback?): Unit

When makeSceneTransitionAnimation was used to start an Activity, listener will be called to handle shared elements on the launching Activity. Most calls will only come when returning from the started Activity. This requires FEATURE_CONTENT_TRANSITIONS.

Parameters
listener: SharedElementCallback?

Used to manipulate shared element transitions on the launching Activity.

startActivityFromFragment

Added in 1.1.0
fun startActivityFromFragment(
    fragment: Fragment,
    intent: Intent,
    requestCode: Int
): Unit

Called by Fragment.startActivityForResult() to implement its behavior.

Parameters
fragment: Fragment

the Fragment to start the activity from.

intent: Intent

The intent to start.

requestCode: Int

The request code to be returned in onActivityResult when the activity exits. Must be between 0 and 65535 to be considered valid. If given requestCode is greater than 65535, an IllegalArgumentException would be thrown.

startActivityFromFragment

Added in 1.1.0
fun startActivityFromFragment(
    fragment: Fragment,
    intent: Intent,
    requestCode: Int,
    options: Bundle?
): Unit

Called by Fragment.startActivityForResult() to implement its behavior.

Parameters
fragment: Fragment

the Fragment to start the activity from.

intent: Intent

The intent to start.

requestCode: Int

The request code to be returned in onActivityResult when the activity exits. Must be between 0 and 65535 to be considered valid. If given requestCode is greater than 65535, an IllegalArgumentException would be thrown.

options: Bundle?

Additional options for how the Activity should be started. See startActivity for more details. This value may be null.

startIntentSenderFromFragment

Added in 1.1.0
Deprecated in 1.3.0
fun startIntentSenderFromFragment(
    fragment: Fragment,
    intent: IntentSender,
    requestCode: Int,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int,
    options: Bundle?
): Unit

Called by Fragment.startIntentSenderForResult() to implement its behavior.

Parameters
fragment: Fragment

the Fragment to start the intent sender from.

intent: IntentSender

The IntentSender to launch.

requestCode: Int

The request code to be returned in onActivityResult when the activity exits. Must be between 0 and 65535 to be considered valid. If given requestCode is greater than 65535, an IllegalArgumentException would be thrown.

fillInIntent: Intent?

If non-null, this will be provided as the intent parameter to sendIntent. This value may be null.

flagsMask: Int

Intent flags in the original IntentSender that you would like to change.

flagsValues: Int

Desired values for any bits set in flagsMask.

extraFlags: Int

Always set to 0.

options: Bundle?

Additional options for how the Activity should be started. See startActivity for more details. This value may be null.

Throws
android.content.IntentSender.SendIntentException

if the call fails to execute.

supportFinishAfterTransition

Added in 1.1.0
fun supportFinishAfterTransition(): Unit

Reverses the Activity Scene entry Transition and triggers the calling Activity to reverse its exit Transition. When the exit Transition completes, finish is called. If no entry Transition was used, finish() is called immediately and the Activity exit Transition is run.

On Android 4.4 or lower, this method only finishes the Activity with no special exit transition.

supportInvalidateOptionsMenu

Added in 1.1.0
Deprecated in 1.1.0
fun supportInvalidateOptionsMenu(): Unit

Support library version of invalidateOptionsMenu.

Invalidate the activity's options menu. This will cause relevant presentations of the menu to fully update via calls to onCreateOptionsMenu and onPrepareOptionsMenu the next time the menu is requested.

supportPostponeEnterTransition

Added in 1.1.0
fun supportPostponeEnterTransition(): Unit

Support library version of postponeEnterTransition that works only on API 21 and later.

supportStartPostponedEnterTransition

Added in 1.1.0
fun supportStartPostponedEnterTransition(): Unit

Support library version of startPostponedEnterTransition that only works with API 21 and later.

validateRequestPermissionsRequestCode

Added in 1.1.0
Deprecated in 1.3.0
fun validateRequestPermissionsRequestCode(requestCode: Int): Unit

Protected functions

onActivityResult

Added in 1.7.0-alpha02
@CallSuper
protected fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Unit

onCreate

Added in 1.7.0-alpha02
protected fun onCreate(savedInstanceState: Bundle?): Unit

Perform initialization of all fragments.

onDestroy

Added in 1.7.0-alpha02
protected fun onDestroy(): Unit

Destroy all fragments.

onPause

Added in 1.7.0-alpha02
protected fun onPause(): Unit

Dispatch onPause() to fragments.

onPostResume

Added in 1.7.0-alpha02
protected fun onPostResume(): Unit

Dispatch onResume() to fragments.

onResume

Added in 1.7.0-alpha02
protected fun onResume(): Unit

Dispatch onResume() to fragments. Note that for better inter-operation with older versions of the platform, at the point of this call the fragments attached to the activity are not resumed.

onResumeFragments

Added in 1.1.0
protected fun onResumeFragments(): Unit

This is the fragment-orientated version of onResume that you can override to perform operations in the Activity at the same point where its fragments are resumed. Be sure to always call through to the super-class.

onStart

Added in 1.7.0-alpha02
protected fun onStart(): Unit

Dispatch onStart() to all fragments.

onStop

Added in 1.7.0-alpha02
protected fun onStop(): Unit

Dispatch onStop() to all fragments.