create

@NonNull
open fun create(@NonNull activity: @NonNull Activity, @Nullable callback: @Nullable AppCompatCallback): @NonNull AppCompatDelegate

Create an androidx.appcompat.app.AppCompatDelegate to use with activity.

Parameters

activity

The activity linked to the returned instance.

callback

An optional callback for AppCompat specific events


@NonNull
open fun create(@NonNull dialog: @NonNull Dialog, @Nullable callback: @Nullable AppCompatCallback): @NonNull AppCompatDelegate

Create an androidx.appcompat.app.AppCompatDelegate to use with dialog.

Parameters

dialog

The dialog to be linked to the returned instance instead of an activity.

callback

An optional callback for AppCompat specific events


@NonNull
open fun create(@NonNull context: @NonNull Context, @NonNull window: @NonNull Window, @Nullable callback: @Nullable AppCompatCallback): @NonNull AppCompatDelegate

Create an androidx.appcompat.app.AppCompatDelegate to use with a context and a window.

Parameters

context

The context of the associated window

window

The window to be linked to the returned instance instead of an activity.

callback

An optional callback for AppCompat specific events


@NonNull
open fun create(@NonNull context: @NonNull Context, @NonNull activity: @NonNull Activity, @Nullable callback: @Nullable AppCompatCallback): @NonNull AppCompatDelegate

Create an androidx.appcompat.app.AppCompatDelegate to use with a context and hosted by an Activity.

Parameters

context

The context of the associated activity

activity

The activity to be linked to the returned instance

callback

An optional callback for AppCompat specific events