Package com.pspdfkit.ui.settings
Class SettingsDialog
-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks
,android.content.DialogInterface.OnCancelListener
,android.content.DialogInterface.OnDismissListener
,android.view.View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
public class SettingsDialog extends AppCompatDialogFragment
Settings dialog class that hosts the SettingsView
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
SettingsDialog.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static String
FRAGMENT_TAG
public final static String
ORIGINAL_OPTIONS_KEY
public final static String
OPTIONS_KEY
public final static SettingsDialog.Companion
Companion
-
Constructor Summary
Constructors Constructor Description SettingsDialog(SettingsDialogListener listener, SettingsOptions options)
SettingsDialog()
-
Method Summary
Modifier and Type Method Description final Unit
updateListener(SettingsDialogListener listener)
Assigns a new SettingsDialogListener to the dialog. Dialog
onCreateDialog(Bundle savedInstanceState)
Restores state the instance if necessary and sets the general style for the dialog. Unit
onSaveInstanceState(Bundle outState)
Stores the current instance state. Unit
onResume()
Unit
onStart()
Unit
setupDialog(Dialog dialog, Integer style)
final static SettingsDialog
show(FragmentManager fragmentManager, SettingsDialogListener listener, SettingsOptions options)
Shows the dialog. final static SettingsDialog
restore(FragmentManager fragmentManager, SettingsDialogListener listener)
Restores existing instance of the dialog if exists. -
-
Constructor Detail
-
SettingsDialog
SettingsDialog(SettingsDialogListener listener, SettingsOptions options)
-
SettingsDialog
SettingsDialog()
-
-
Method Detail
-
updateListener
final Unit updateListener(SettingsDialogListener listener)
Assigns a new SettingsDialogListener to the dialog.
-
onCreateDialog
Dialog onCreateDialog(Bundle savedInstanceState)
Restores state the instance if necessary and sets the general style for the dialog.
-
onSaveInstanceState
Unit onSaveInstanceState(Bundle outState)
Stores the current instance state.
-
setupDialog
Unit setupDialog(Dialog dialog, Integer style)
-
show
final static SettingsDialog show(FragmentManager fragmentManager, SettingsDialogListener listener, SettingsOptions options)
Shows the dialog. Will always attempt to obtain an existing instance of the dialog.
- Parameters:
fragmentManager
- The FragmentManager to use.listener
- The SettingsDialogListener to use.options
- The current SettingsOptions to be displayed.- Returns:
Created/existing dialog instance.
-
restore
final static SettingsDialog restore(FragmentManager fragmentManager, SettingsDialogListener listener)
Restores existing instance of the dialog if exists.
- Parameters:
fragmentManager
- The FragmentManager to use.listener
- The new SettingsDialog to use for the restored dialog instance- Returns:
Existing dialog instance or null if not existing.
-
-
-
-