PreferenceDialogFragment

Added in 1.0.0
Deprecated in 1.1.0

abstract class PreferenceDialogFragment : DialogFragment, DialogInterface.OnClickListener


Abstract base class which presents a dialog associated with a DialogPreference. Since the preference object may not be available during fragment re-creation, the necessary information for displaying the dialog is read once during the initial call to onCreate and saved/restored in the saved instance state. Custom subclasses should also follow this pattern.

Summary

Constants

const String!
ARG_KEY = "key"

This property is deprecated.

Use PreferenceDialogFragmentCompat instead

Public constructors

This function is deprecated.

Use PreferenceDialogFragmentCompat instead

Public functions

DialogPreference!

This function is deprecated.

Use PreferenceDialogFragmentCompat instead

Unit
onClick(dialog: DialogInterface, which: Int)

This function is deprecated.

Use PreferenceDialogFragmentCompat instead

Unit
onCreate(savedInstanceState: Bundle?)

This function is deprecated.

Dialog
onCreateDialog(savedInstanceState: Bundle?)

This function is deprecated.

abstract Unit
onDialogClosed(positiveResult: Boolean)

This function is deprecated.

Use PreferenceDialogFragmentCompat instead

Unit

This function is deprecated.

Unit

This function is deprecated.

Protected functions

Unit

This function is deprecated.

Use PreferenceDialogFragmentCompat instead

View?

This function is deprecated.

Use PreferenceDialogFragmentCompat instead

Unit

This function is deprecated.

Use PreferenceDialogFragmentCompat instead

Inherited Constants

From android.content.ComponentCallbacks2
From android.app.DialogFragment
const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

Inherited functions

From android.app.DialogFragment
Unit

This function is deprecated.

Unit

This function is deprecated.

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

This function is deprecated.

Dialog!

This function is deprecated.

Boolean

This function is deprecated.

Int

This function is deprecated.

Boolean

This function is deprecated.

Unit
onActivityCreated(savedInstanceState: Bundle!)

This function is deprecated.

Unit
onAttach(context: Context!)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

LayoutInflater!
onGetLayoutInflater(savedInstanceState: Bundle!)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
setCancelable(cancelable: Boolean)

This function is deprecated.

Unit
setShowsDialog(showsDialog: Boolean)

This function is deprecated.

Unit
setStyle(style: Int, theme: Int)

This function is deprecated.

Unit
show(manager: FragmentManager!, tag: String!)

This function is deprecated.

Int
show(transaction: FragmentTransaction!, tag: String!)

This function is deprecated.

From android.app.Fragment
Boolean
equals(o: Any!)

This function is deprecated.

Activity!

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Bundle!

This function is deprecated.

FragmentManager!

This function is deprecated.

Context!

This function is deprecated.

Transition!

This function is deprecated.

Transition!

This function is deprecated.

FragmentManager!

This function is deprecated.

Any!

This function is deprecated.

Int

This function is deprecated.

LayoutInflater!

This function is deprecated.

LoaderManager!

This function is deprecated.

Fragment!

This function is deprecated.

Transition!

This function is deprecated.

Resources!

This function is deprecated.

Boolean

This function is deprecated.

Transition!

This function is deprecated.

Transition!

This function is deprecated.

Transition!

This function is deprecated.

String!
getString(resId: Int)

This function is deprecated.

String!

This function is deprecated.

Fragment!

This function is deprecated.

Int

This function is deprecated.

CharSequence!
getText(resId: Int)

This function is deprecated.

Boolean

This function is deprecated.

View!

This function is deprecated.

Int

This function is deprecated.

java-static Fragment!
instantiate(context: Context!, fname: String!)

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Unit
onActivityResult(requestCode: Int, resultCode: Int, data: Intent!)

This function is deprecated.

Unit
onAttachFragment(childFragment: Fragment!)

This function is deprecated.

Unit

This function is deprecated.

Boolean

This function is deprecated.

Animator!
onCreateAnimator(transit: Int, enter: Boolean, nextAnim: Int)

This function is deprecated.

Unit
onCreateContextMenu(
    menu: ContextMenu!,
    v: View!,
    menuInfo: ContextMenu.ContextMenuInfo!
)

This function is deprecated.

Unit
onCreateOptionsMenu(menu: Menu!, inflater: MenuInflater!)

This function is deprecated.

View!
onCreateView(
    inflater: LayoutInflater!,
    container: ViewGroup!,
    savedInstanceState: Bundle!
)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
onInflate(attrs: AttributeSet!, savedInstanceState: Bundle!)

This function is deprecated.

Unit

This function is deprecated.

Unit
onMultiWindowModeChanged(
    isInMultiWindowMode: Boolean,
    newConfig: Configuration!
)

This function is deprecated.

Boolean

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
onPictureInPictureModeChanged(
    isInPictureInPictureMode: Boolean,
    newConfig: Configuration!
)

This function is deprecated.

Unit

This function is deprecated.

Unit
onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String!>!,
    grantResults: IntArray!
)

This function is deprecated.

Unit

This function is deprecated.

Unit
onTrimMemory(level: Int)

This function is deprecated.

Unit
onViewCreated(view: View!, savedInstanceState: Bundle!)

This function is deprecated.

Unit
onViewStateRestored(savedInstanceState: Bundle!)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
requestPermissions(permissions: Array<String!>!, requestCode: Int)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
setMenuVisibility(menuVisible: Boolean)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
setTargetFragment(fragment: Fragment!, requestCode: Int)

This function is deprecated.

Unit
setUserVisibleHint(isVisibleToUser: Boolean)

This function is deprecated.

Boolean

This function is deprecated.

Unit

This function is deprecated.

Unit
startActivityForResult(intent: Intent!, requestCode: Int)

This function is deprecated.

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

This function is deprecated.

Unit

This function is deprecated.

String!

This function is deprecated.

Unit

This function is deprecated.

Constants

ARG_KEY

Added in 1.0.0
Deprecated in 1.1.0
protected const val ARG_KEY = "key": String!

Public constructors

PreferenceDialogFragment

Added in 1.0.0
Deprecated in 1.1.0
PreferenceDialogFragment()

Public functions

getPreference

Added in 1.0.0
Deprecated in 1.1.0
fun getPreference(): DialogPreference!

Get the preference that requested this dialog. Available after onCreate has been called on the PreferenceFragment which launched this dialog.

Returns
DialogPreference!

The DialogPreference associated with this dialog

onClick

Added in 1.0.0
Deprecated in 1.1.0
fun onClick(dialog: DialogInterface, which: Int): Unit

onCreate

Added in 1.0.0
Deprecated in 1.1.0
fun onCreate(savedInstanceState: Bundle?): Unit

onCreateDialog

Added in 1.0.0
Deprecated in 1.1.0
fun onCreateDialog(savedInstanceState: Bundle?): Dialog

onDialogClosed

Added in 1.0.0
Deprecated in 1.1.0
abstract fun onDialogClosed(positiveResult: Boolean): Unit

onDismiss

Added in 1.0.0
Deprecated in 1.1.0
fun onDismiss(dialog: DialogInterface): Unit

onSaveInstanceState

Added in 1.0.0
Deprecated in 1.1.0
fun onSaveInstanceState(outState: Bundle): Unit

Protected functions

onBindDialogView

Added in 1.0.0
Deprecated in 1.1.0
protected fun onBindDialogView(view: View): Unit

Binds views in the content view of the dialog to data.

Make sure to call through to the superclass implementation.

Parameters
view: View

The content view of the dialog, if it is custom

onCreateDialogView

Added in 1.0.0
Deprecated in 1.1.0
protected fun onCreateDialogView(context: Context): View?

Creates the content view for the dialog (if a custom content view is required). By default, it inflates the dialog layout resource if it is set.

Returns
View?

The content view for the dialog

onPrepareDialogBuilder

Added in 1.0.0
Deprecated in 1.1.0
protected fun onPrepareDialogBuilder(builder: AlertDialog.Builder): Unit

Prepares the dialog builder to be shown when the preference is clicked. Use this to set custom properties on the dialog.

Do not create or show.