PreviewActivity


Activity used to run @Composable previews from Android Studio.

The supported @Composable functions either have no parameters, or have only parameters with default values and/or one parameter annotated with @PreviewParameter.

The @Composable fully qualified name must be passed to this Activity through intent parameters, using composable as the key. When deploying Compose Previews with @PreviewParameter annotated parameters, the provider should be specified as an intent parameter as well, using the key parameterProviderClassName. Optionally, parameterProviderIndex can also be set to display a specific provider value instead of all of them.

Summary

Public constructors

android

Protected functions

open Unit
onCreate(savedInstanceState: Bundle?)

{@inheritDoc}

android

Inherited functions

From android.app.Activity
Unit
android
Unit
android
Unit
android
Unit
android
PendingIntent
createPendingResult(requestCode: Int, data: Intent, flags: Int)
android
Unit
android
Unit
android
Boolean
android
Boolean
android
Boolean
android
Boolean
android
Unit
dump(
    prefix: String,
    fd: FileDescriptor?,
    writer: PrintWriter,
    args: Array<String>?
)
android
Unit
android
Boolean
android
T
<T : View> findViewById(id: Int)
android
Unit
android
Unit
finishActivity(requestCode: Int)
android
Unit
finishActivityFromChild(child: Activity, requestCode: Int)
android
Unit
android
Unit
android
Unit
android
Unit
android
SharedPreferences
android
Any
android
Boolean
android
Unit
android
Cursor
managedQuery(
    uri: Uri,
    projection: Array<String>,
    selection: String,
    selectionArgs: Array<String>,
    sortOrder: String
)
android
Boolean
android
Boolean
navigateUpTo(upIntent: Intent)
android
Boolean
navigateUpToFromChild(child: Activity, upIntent: Intent)
android
Unit
android
Unit
android
Unit
onActivityReenter(resultCode: Int, data: Intent)
android
Unit
onActivityResult(
    requestCode: Int,
    resultCode: Int,
    data: Intent?,
    caller: ComponentCaller
)
android
Unit
onApplyThemeResource(theme: Resources.Theme, resid: Int, first: Boolean)
android
Unit
android
Unit
android
Unit
onChildTitleChanged(childActivity: Activity, title: CharSequence)
android
Unit
android
Boolean
android
Unit
android
Unit
onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?)
android
Unit
onCreateContextMenu(
    menu: ContextMenu,
    v: View,
    menuInfo: ContextMenu.ContextMenuInfo
)
android
CharSequence?
android
Dialog
android
Dialog?
onCreateDialog(id: Int, args: Bundle)
android
Unit
android
Boolean
android
View?
onCreatePanelView(featureId: Int)
android
Boolean
onCreateThumbnail(outBitmap: Bitmap, canvas: Canvas)
android
View?
onCreateView(name: String, context: Context, attrs: AttributeSet)
android
View?
onCreateView(
    parent: View?,
    name: String,
    context: Context,
    attrs: AttributeSet
)
android
Unit
android
Unit
android
Unit
android
Boolean
android
Unit
onGetDirectActions(
    cancellationSignal: CancellationSignal,
    callback: Consumer<MutableList<DirectAction>>
)
android
HandoffActivityData?
android
Boolean
onKeyDown(keyCode: Int, event: KeyEvent)
android
Boolean
onKeyLongPress(keyCode: Int, event: KeyEvent)
android
Boolean
onKeyMultiple(keyCode: Int, repeatCount: Int, event: KeyEvent)
android
Boolean
onKeyShortcut(keyCode: Int, event: KeyEvent)
android
Boolean
onKeyUp(keyCode: Int, event: KeyEvent)
android
Unit
android
Unit
android
Unit
android
Boolean
onMenuOpened(featureId: Int, menu: Menu)
android
Boolean
android
Boolean
android
Unit
onNewIntent(intent: Intent, caller: ComponentCaller)
android
Boolean
android
Unit
android
Unit
android
Unit
onPerformDirectAction(
    actionId: String,
    arguments: Bundle,
    cancellationSignal: CancellationSignal,
    resultListener: Consumer<Bundle>
)
android
Boolean
android
Unit
onPostCreate(savedInstanceState: Bundle?)
android
Unit
onPostCreate(
    savedInstanceState: Bundle?,
    persistentState: PersistableBundle?
)
android
Unit
android
Unit
onPrepareDialog(id: Int, dialog: Dialog)
android
Unit
onPrepareDialog(id: Int, dialog: Dialog, args: Bundle)
android
Unit
android
Boolean
android
Unit
android
Unit
android
Unit
onProvideKeyboardShortcuts(
    data: MutableList<KeyboardShortcutGroup>,
    menu: Menu?,
    deviceId: Int
)
android
Uri
android
Unit
onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String>,
    grantResults: IntArray,
    deviceId: Int
)
android
Unit
android
Unit
onRestoreInstanceState(savedInstanceState: Bundle)
android
Unit
onRestoreInstanceState(
    savedInstanceState: Bundle?,
    persistentState: PersistableBundle?
)
android
Unit
android
Unit
onSaveInstanceState(
    outState: Bundle,
    outPersistentState: PersistableBundle
)
android
Boolean
android
Boolean
android
Unit
android
Unit
android
Unit
android
Unit
onTitleChanged(title: CharSequence, color: Int)
android
Unit
onTopResumedActivityChanged(isTopResumedActivity: Boolean)
android
Boolean
android
Boolean
android
Unit
android
Unit
android
Unit
android
Unit
android
ActionMode?
android
ActionMode?
android
Unit
android
Unit
android
Unit
overrideActivityTransition(
    overrideType: Int,
    enterAnim: Int,
    exitAnim: Int
)
android
Unit
overrideActivityTransition(
    overrideType: Int,
    enterAnim: Int,
    exitAnim: Int,
    backgroundColor: Int
)
android
Unit
overridePendingTransition(enterAnim: Int, exitAnim: Int)
android
Unit
overridePendingTransition(
    enterAnim: Int,
    exitAnim: Int,
    backgroundColor: Int
)
android
Unit
android
Unit
android
Unit
android
Unit
android
Unit
android
Unit
android
Boolean
android
Unit
android
DragAndDropPermissions
android
Unit
requestFullscreenMode(
    request: Int,
    approvalCallback: OutcomeReceiver<VoidThrowable>?
)
android
Unit
android
Unit
requestPermissions(permissions: Array<String>, requestCode: Int)
android
Unit
requestPermissions(
    permissions: Array<String>,
    requestCode: Int,
    deviceId: Int
)
android
Unit
android
Boolean
android
Boolean
android
T
<T : View> requireViewById(id: Int)
android
Unit
android
Unit
setActionBar(toolbar: Toolbar?)
android
Unit
android
Unit
android
Unit
android
Unit
android
Unit
setFeatureDrawable(featureId: Int, drawable: Drawable)
android
Unit
setFeatureDrawableAlpha(featureId: Int, alpha: Int)
android
Unit
setFeatureDrawableResource(featureId: Int, resId: Int)
android
Unit
setFeatureDrawableUri(featureId: Int, uri: Uri)
android
Unit
android
Unit
setHandoffEnabled(
    handoffEnabled: Boolean,
    handoffActivityParams: HandoffActivityParams?
)
android
Unit
setInheritShowWhenLocked(inheritShowWhenLocked: Boolean)
android
Unit
setIntent(newIntent: Intent?, newCaller: ComponentCaller?)
android
Unit
setLocusContext(locusId: LocusId?, bundle: Bundle?)
android
Unit
android
Unit
setProgress(progress: Int)
android
Unit
android
Unit
android
Unit
android
Unit
android
Unit
setResult(resultCode: Int)
android
Unit
setResult(resultCode: Int, data: Intent)
android
Unit
setSecondaryProgress(secondaryProgress: Int)
android
Unit
setShouldDockBigOverlays(shouldDockBigOverlays: Boolean)
android
Unit
setShowWhenLocked(showWhenLocked: Boolean)
android
Unit
android
Unit
setTheme(resid: Int)
android
Unit
setTitle(titleId: Int)
android
Boolean
setTranslucent(translucent: Boolean)
android
Unit
setTurnScreenOn(turnScreenOn: Boolean)
android
Unit
setVisible(visible: Boolean)
android
Unit
setVrModeEnabled(enabled: Boolean, requestedComponent: ComponentName)
android
Boolean
android
Boolean
android
Boolean
android
Boolean
android
Boolean
android
Unit
android
Boolean
showDialog(id: Int, args: Bundle)
android
Unit
android
ActionMode?
android
ActionMode?
android
Unit
android
Unit
startActivities(intents: Array<Intent>, options: Bundle?)
android
Unit
android
Unit
startActivity(intent: Intent, options: Bundle?)
android
Unit
startActivityFromChild(child: Activity, intent: Intent, requestCode: Int)
android
Unit
startActivityFromChild(
    child: Activity,
    intent: Intent,
    requestCode: Int,
    options: Bundle?
)
android
Unit
startActivityFromFragment(
    fragment: Fragment,
    intent: Intent,
    requestCode: Int
)
android
Unit
startActivityFromFragment(
    fragment: Fragment,
    intent: Intent,
    requestCode: Int,
    options: Bundle?
)
android
Boolean
startActivityIfNeeded(intent: Intent, requestCode: Int)
android
Boolean
startActivityIfNeeded(intent: Intent, requestCode: Int, options: Bundle?)
android
Unit
startIntentSender(
    intent: IntentSender,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int
)
android
Unit
startIntentSender(
    intent: IntentSender,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int,
    options: Bundle?
)
android
Unit
startIntentSenderFromChild(
    child: Activity,
    intent: IntentSender,
    requestCode: Int,
    fillInIntent: Intent,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int
)
android
Unit
startIntentSenderFromChild(
    child: Activity,
    intent: IntentSender,
    requestCode: Int,
    fillInIntent: Intent,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int,
    options: Bundle?
)
android
Unit
android
Unit
android
Unit
android
Boolean
android
Boolean
startNextMatchingActivity(intent: Intent, options: Bundle?)
android
Unit
android
Unit
startSearch(
    initialQuery: String?,
    selectInitialQuery: Boolean,
    appSearchData: Bundle?,
    globalSearch: Boolean
)
android
Unit
android
Unit
android
Unit
android
Unit
android
Unit
triggerSearch(query: String, appSearchData: Bundle?)
android
Unit
android
Unit
android
Unit
android
Unit
android
From androidx.activity.ComponentActivity
open Unit
android
open Unit

Adds the given MenuProvider to this MenuHost.

android
open Unit

Adds the given MenuProvider to this MenuHost.

android
open Unit
addMenuProvider(
    provider: MenuProvider,
    owner: LifecycleOwner,
    state: Lifecycle.State
)

Adds the given MenuProvider to this MenuHost once the given LifecycleOwner reaches the given Lifecycle.State.

android
final Unit

Add a new listener that will get a callback associated with ComponentCallbacks.onConfigurationChanged with the new Configuration.

android
final Unit

{@inheritDoc}

android
final Unit

Add a new listener that will get a callback associated with Activity.onMultiWindowModeChanged with the new MultiWindowModeChangedInfo.

android
final Unit

Add a new listener that will get a callback associated with Activity.onNewIntent with the new Intent.

android
final Unit

Add a new listener that will get a callback associated with Activity.onPictureInPictureModeChanged with the new PictureInPictureModeChangedInfo.

android
final Unit

Add a new listener that will get a callback associated with Activity.onPictureInPictureUiStateChanged with the new PictureInPictureUiStateCompat.

android
final Unit

Add a new listener that will get a callback associated with ComponentCallbacks2.onTrimMemory with the int representing the level of trimming.

android
final Unit

Add a new listener that will get a callback associated with Activity.onUserLeaveHint

android
final Unit

Available since API 24 in the framework Activity class, puts the activity in picture-in-picture mode if possible in the current system state.

android
open Unit

Sets the view tree owners before setting the content view so that the inflation process and attach listeners will see them already present.

android
open Unit

Invalidates the android.view.Menu to ensure that what is displayed matches the current internal state of the menu.

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

This function is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

android
open Unit

This function is deprecated. This method has been deprecated in favor of using the {@link OnBackPressedDispatcher} via {@link #getOnBackPressedDispatcher()}.

android
open Unit

{@inheritDoc}

android
open Boolean
onCreatePanelMenu(featureId: Int, menu: Menu)
android
open Boolean
onMenuItemSelected(featureId: Int, item: MenuItem)
android
open Unit

This function is deprecated. Deprecated in android.app.Activity

android
open Unit
@RequiresApi(api = 26)
@CallSuper
onMultiWindowModeChanged(
    isInMultiWindowMode: Boolean,
    newConfig: Configuration
)

{@inheritDoc}

android
open Unit

{@inheritDoc}

android
open Unit
onPanelClosed(featureId: Int, menu: Menu)
android
open Unit
@CallSuper
onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)

This function is deprecated. Deprecated in android.app.Activity

android
open Unit
@RequiresApi(api = 26)
@CallSuper
onPictureInPictureModeChanged(
    isInPictureInPictureMode: Boolean,
    newConfig: Configuration
)

{@inheritDoc}

android
open Unit

{@inheritDoc}

android
open Boolean
onPreparePanel(featureId: Int, view: View?, menu: Menu)
android
open Unit
@CallSuper
onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String>,
    grantResults: IntArray
)

This function is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

android
open Any?

This function is deprecated. Use a {@link androidx.lifecycle.ViewModel} to store non config state.

android
final Any?

Retain all appropriate non-config state.

android
open Unit
android
open Unit

{@inheritDoc}

android
open Unit

{@inheritDoc}

android
open Context?

Get the Context if it is currently available.

android
final ActivityResultLauncher<I>
<I : Any?, O : Any?> registerForActivityResult(
    contract: ActivityResultContract<I, O>,
    callback: ActivityResultCallback<O>
)

Register a request to start an activity for result, designated by the given contract.

android
final ActivityResultLauncher<I>
<I : Any?, O : Any?> registerForActivityResult(
    contract: ActivityResultContract<I, O>,
    registry: ActivityResultRegistry,
    callback: ActivityResultCallback<O>
)

Register a request to start an activity for result, designated by the given contract.

android
open Unit

Removes the given MenuProvider from this MenuHost.

android
final Unit

Remove a previously added listener.

android
final Unit

Remove a OnContextAvailableListener previously added via addOnContextAvailableListener.

android
final Unit

Remove a previously added listener.

android
final Unit

Remove a previously added listener.

android
final Unit

Remove a previously added listener.

android
final Unit

Remove a previously added listener.

android
final Unit

Remove a previously added listener.

android
final Unit

Remove a previously added listener.

android
open Unit
android
open Unit
setContentView(layoutResID: @LayoutRes Int)
android
open Unit
android
open Unit
android
final Unit

Available since API 26 in the framework Activity class, updates the properties of the picture-in-picture activity, or sets it to be used later when enterPictureInPictureMode is called

android
open Unit
startActivityForResult(intent: Intent, requestCode: Int)

This function is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

android
open Unit
startActivityForResult(intent: Intent, requestCode: Int, options: Bundle?)

This function is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

android
open Unit
startIntentSenderForResult(
    intent: IntentSender,
    requestCode: Int,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int
)

This function is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

android
open Unit
startIntentSenderForResult(
    intent: IntentSender,
    requestCode: Int,
    fillInIntent: Intent?,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int,
    options: Bundle?
)

This function is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

android
From android.content.Context
Boolean
bindIsolatedService(
    service: Intent,
    flags: Context.BindServiceFlags,
    instanceName: String,
    executor: Executor,
    conn: ServiceConnection
)
android
Int
android
ColorStateList
android
Drawable?
android
String
getString(resId: Int)
android
String
getString(resId: Int, vararg formatArgs: Any)
android
T
<T : Any> getSystemService(serviceClass: Class<T>)
android
CharSequence
getText(resId: Int)
android
TypedArray
android
TypedArray
android
TypedArray
android
TypedArray
obtainStyledAttributes(
    set: AttributeSet?,
    attrs: IntArray,
    defStyleAttr: Int,
    defStyleRes: Int
)
android
Unit
android
Unit
sendBroadcastWithMultiplePermissions(
    intent: Intent,
    receiverPermissions: Array<String>
)
android
From android.view.ContextThemeWrapper
Unit
applyOverrideConfiguration(overrideConfiguration: Configuration)
android
From android.content.ContextWrapper
Boolean
bindIsolatedService(
    service: Intent,
    flags: Int,
    instanceName: String,
    executor: Executor,
    conn: ServiceConnection
)
android
Boolean
bindService(
    service: Intent,
    conn: ServiceConnection,
    flags: Context.BindServiceFlags
)
android
Boolean
bindService(service: Intent, conn: ServiceConnection, flags: Int)
android
Boolean
bindService(
    service: Intent,
    flags: Context.BindServiceFlags,
    executor: Executor,
    conn: ServiceConnection
)
android
Boolean
bindService(
    service: Intent,
    flags: Int,
    executor: Executor,
    conn: ServiceConnection
)
android
Boolean
bindServiceAsUser(
    service: Intent,
    conn: ServiceConnection,
    flags: Context.BindServiceFlags,
    user: UserHandle
)
android
Boolean
bindServiceAsUser(
    service: Intent,
    conn: ServiceConnection,
    flags: Int,
    user: UserHandle
)
android
Int
android
Int
android
IntArray
android
Int
android
Int
checkCallingUriPermission(uri: Uri, modeFlags: Int)
android
IntArray
android
Int
checkContentUriPermissionFull(uri: Uri, pid: Int, uid: Int, modeFlags: Int)
android
Int
checkPermission(permission: String, pid: Int, uid: Int)
android
Int
android
Int
checkUriPermission(uri: Uri, pid: Int, uid: Int, modeFlags: Int)
android
Int
checkUriPermission(
    uri: Uri?,
    readPermission: String?,
    writePermission: String?,
    pid: Int,
    uid: Int,
    modeFlags: Int
)
android
IntArray
checkUriPermissions(
    uris: MutableList<Uri>,
    pid: Int,
    uid: Int,
    modeFlags: Int
)
android
Unit
android
Context
createAttributionContext(attributionTag: String?)
android
Context
createConfigurationContext(overrideConfiguration: Configuration)
android
Context
createContext(contextParams: ContextParams)
android
Context
android
Context
android
Context
android
Context
android
Context
createPackageContext(packageName: String, flags: Int)
android
Context
createWindowContext(type: Int, options: Bundle?)
android
Context
createWindowContext(display: Display, type: Int, options: Bundle?)
android
Array<String>
android
Boolean
android
Boolean
android
Boolean
android
Unit
enforceCallingOrSelfPermission(permission: String, message: String?)
android
Unit
enforceCallingOrSelfUriPermission(
    uri: Uri,
    modeFlags: Int,
    message: String
)
android
Unit
enforceCallingPermission(permission: String, message: String?)
android
Unit
enforceCallingUriPermission(uri: Uri, modeFlags: Int, message: String)
android
Unit
enforcePermission(permission: String, pid: Int, uid: Int, message: String?)
android
Unit
enforceUriPermission(
    uri: Uri,
    pid: Int,
    uid: Int,
    modeFlags: Int,
    message: String
)
android
Unit
enforceUriPermission(
    uri: Uri?,
    readPermission: String?,
    writePermission: String?,
    pid: Int,
    uid: Int,
    modeFlags: Int,
    message: String?
)
android
Array<String>
android
File
android
File
getDir(name: String, mode: Int)
android
File?
android
Array<File>
android
File
android
SharedPreferences
android
String?
getSystemServiceName(serviceClass: Class<*>)
android
Unit
grantUriPermission(toPackage: String, uri: Uri, modeFlags: Int)
android
Boolean
moveDatabaseFrom(sourceContext: Context, name: String)
android
Boolean
moveSharedPreferencesFrom(sourceContext: Context, name: String)
android
FileInputStream
android
FileOutputStream
openFileOutput(name: String, mode: Int)
android
SQLiteDatabase
openOrCreateDatabase(
    name: String,
    mode: Int,
    factory: SQLiteDatabase.CursorFactory
)
android
SQLiteDatabase
openOrCreateDatabase(
    name: String,
    mode: Int,
    factory: SQLiteDatabase.CursorFactory,
    errorHandler: DatabaseErrorHandler?
)
android
Drawable
android
Unit
android
Unit
android
Intent?
android
Intent?
registerReceiver(
    receiver: BroadcastReceiver?,
    filter: IntentFilter,
    flags: Int
)
android
Intent?
registerReceiver(
    receiver: BroadcastReceiver?,
    filter: IntentFilter,
    broadcastPermission: String?,
    scheduler: Handler?
)
android
Intent?
registerReceiver(
    receiver: BroadcastReceiver?,
    filter: IntentFilter,
    broadcastPermission: String?,
    scheduler: Handler?,
    flags: Int
)
android
Unit
android
Unit
android
Unit
android
Unit
revokeUriPermission(uri: Uri, modeFlags: Int)
android
Unit
revokeUriPermission(targetPackage: String, uri: Uri, modeFlags: Int)
android
Unit
android
Unit
sendBroadcast(intent: Intent, receiverPermission: String?)
android
Unit
sendBroadcast(intent: Intent, receiverPermission: String?, options: Bundle?)
android
Unit
android
Unit
sendBroadcastAsUser(
    intent: Intent,
    user: UserHandle,
    receiverPermission: String?
)
android
Unit
sendOrderedBroadcast(intent: Intent, receiverPermission: String?)
android
Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    options: Bundle?
)
android
Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)
android
Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    options: Bundle?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)
android
Unit
sendOrderedBroadcast(
    intent: Intent,
    receiverPermission: String?,
    receiverAppOp: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)
android
Unit
sendOrderedBroadcast(
    intent: Intent,
    initialCode: Int,
    receiverPermission: String?,
    receiverAppOp: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialData: String?,
    initialExtras: Bundle?,
    options: Bundle?
)
android
Unit
sendOrderedBroadcastAsUser(
    intent: Intent,
    user: UserHandle,
    receiverPermission: String?,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)
android
Unit
android
Unit
sendStickyBroadcast(intent: Intent, options: Bundle?)
android
Unit
android
Unit
sendStickyOrderedBroadcast(
    intent: Intent,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)
android
Unit
sendStickyOrderedBroadcastAsUser(
    intent: Intent,
    user: UserHandle,
    resultReceiver: BroadcastReceiver?,
    scheduler: Handler?,
    initialCode: Int,
    initialData: String?,
    initialExtras: Bundle?
)
android
Unit
android
Unit
android
ComponentName?
android
Boolean
startInstrumentation(
    className: ComponentName,
    profileFile: String?,
    arguments: Bundle?
)
android
ComponentName?
startService(service: Intent)
android
Boolean
android
Unit
android
Unit
android
Unit
android
Unit
android
Unit
updateServiceGroup(conn: ServiceConnection, group: Int, importance: Int)
android
From android.view.Window.Callback
Unit
android

Inherited properties

From android.app.Activity
open ActionBar?
android
Application
android
open ComponentCaller?
android
open ComponentName?
android
open String?
android
open Int
android
open ComponentName
android
open Scene
android
open TransitionManager
android
open ComponentCaller
android
open View?
android
open FragmentManager
android
open ComponentCaller
android
open Intent
android
open Boolean
android
open Boolean
android
Boolean
android
open Boolean
android
open Boolean
android
Boolean
android
open Boolean
android
open Boolean
android
open Boolean
android
open Boolean
android
open Boolean
android
open Boolean
android
open Boolean
android
open Boolean
android
open Any?
android
open String?
android
open Int
android
open LayoutInflater
android
open LoaderManager
android
open String
android
open Int
android
MediaController
android
open MenuInflater
android
open OnBackInvokedDispatcher
android
Activity
android
open Intent?
android
open Uri?
android
open Int
android
SearchEvent
android
SplashScreen
android
open Int
android
CharSequence
android
Int
android
open VoiceInteractor
android
Int
android
open Window
android
open WindowManager
android
From androidx.activity.ComponentActivity
final ActivityResultRegistry

Get the ActivityResultRegistry associated with this activity.

android
open CreationExtras

Returns the default CreationExtras that should be passed into ViewModelProvider.Factory.create when no overriding CreationExtras were passed to the ViewModelProvider constructors.

android
open ViewModelProvider.Factory

Returns the default ViewModelProvider.Factory that should be used when no custom Factory is provided to the ViewModelProvider constructors.

android
open FullyDrawnReporter

Retrieve the FullyDrawnReporter that should handle the independent parts of the UI that separately report that they are fully drawn.

android
open Any?
android
open Lifecycle

{@inheritDoc}

android
open NavigationEventDispatcher

Lazily provides a NavigationEventDispatcher for back navigation handling, including support for predictive back gestures introduced in Android 13 (API 33+).

android
final OnBackPressedDispatcher

Retrieve the OnBackPressedDispatcher that will be triggered when onBackPressed is called.

android
final SavedStateRegistry

The SavedStateRegistry owned by this SavedStateRegistryOwner

android
open ViewModelStore

The owned ViewModelStore

android
From android.content.Context
From android.view.ContextThemeWrapper
open AssetManager
android
open Resources
android
open Resources.Theme
android
From android.content.ContextWrapper
open Context
android
open ApplicationInfo
android
open AttributionSource
android
open String?
android
open Context
android
open File
android
open ClassLoader
android
open File
android
open ContentResolver
android
open File
android
open Int
android
open Display
android
open File?
android
open Array<File>
android
open Array<File>
android
open File
android
open Boolean
android
open Boolean
android
open Boolean
android
open Executor
android
open Looper
android
open File
android
open File
android
open Array<File>
android
open String
android
open String
android
open PackageManager
android
open String
android
open String
android
open ContextParams?
android
open Drawable
android
open Int
android
open Int
android

Public constructors

PreviewActivity

PreviewActivity()

Protected functions

onCreate

protected open fun onCreate(savedInstanceState: Bundle?): Unit

{@inheritDoc}

If your ComponentActivity is annotated with ContentView, this will call setContentView for you.