import typing

import android.app
import android.content
import android.content.res
import android.graphics.drawable
import android.net
import android.os
import android.util
import android.view
import android.widget
import java
import java.chaquopy
import java.lang
import java.util

class CheckBoxPreference(TwoStatePreference):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def onBindView(self, view: android.view.View, /) -> None: ...

class DialogPreference(android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, Preference, PreferenceManager.OnActivityDestroyListener):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def getDialog(self) -> android.app.Dialog | None: ...
    def getDialogIcon(self) -> android.graphics.drawable.Drawable: ...
    def getDialogLayoutResource(self) -> int: ...
    def getDialogMessage(self) -> java.lang.CharSequence: ...
    def getDialogTitle(self) -> java.lang.CharSequence: ...
    def getNegativeButtonText(self) -> java.lang.CharSequence: ...
    def getPositiveButtonText(self) -> java.lang.CharSequence: ...
    def onActivityDestroy(self) -> None: ...
    def onBindDialogView(self, view: android.view.View, /) -> None: ...
    @typing.overload
    def onClick(self) -> None: ...
    @typing.overload
    def onClick(self, dialog: android.content.DialogInterface, which: int | java.jint | java.lang.Integer, /) -> None: ...
    def onCreateDialogView(self) -> android.view.View: ...
    def onDialogClosed(self, positiveResult: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onDismiss(self, dialog: android.content.DialogInterface, /) -> None: ...
    def onPrepareDialogBuilder(self, builder: android.app.AlertDialog.Builder, /) -> None: ...
    def onRestoreInstanceState(self, state: android.os.Parcelable, /) -> None: ...
    def onSaveInstanceState(self) -> android.os.Parcelable: ...
    @typing.overload
    def setDialogIcon(self, dialogIconRes: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setDialogIcon(self, dialogIcon: android.graphics.drawable.Drawable, /) -> None: ...
    def setDialogLayoutResource(self, dialogLayoutResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setDialogMessage(self, dialogMessageResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setDialogMessage(self, dialogMessage: java.lang.CharSequence, /) -> None: ...
    @typing.overload
    def setDialogTitle(self, dialogTitleResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setDialogTitle(self, dialogTitle: java.lang.CharSequence, /) -> None: ...
    @typing.overload
    def setNegativeButtonText(self, negativeButtonTextResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setNegativeButtonText(self, negativeButtonText: java.lang.CharSequence, /) -> None: ...
    @typing.overload
    def setPositiveButtonText(self, positiveButtonTextResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setPositiveButtonText(self, positiveButtonText: java.lang.CharSequence, /) -> None: ...
    def showDialog(self, state: android.os.Bundle, /) -> None: ...

class EditTextPreference(DialogPreference):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def getEditText(self) -> android.widget.EditText: ...
    def getText(self) -> str: ...
    def onAddEditTextToDialogView(self, dialogView: android.view.View, editText: android.widget.EditText, /) -> None: ...
    def onBindDialogView(self, view: android.view.View, /) -> None: ...
    def onDialogClosed(self, positiveResult: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onGetDefaultValue(self, a: android.content.res.TypedArray, index: int | java.jint | java.lang.Integer, /) -> java.lang.Object: ...
    def onRestoreInstanceState(self, state: android.os.Parcelable, /) -> None: ...
    def onSaveInstanceState(self) -> android.os.Parcelable: ...
    def onSetInitialValue(self, restoreValue: bool | java.jboolean | java.lang.Boolean, defaultValue: java.lang.Object | int | bool | float | str, /) -> None: ...
    def setText(self, text: str | java.lang.String, /) -> None: ...
    def shouldDisableDependents(self) -> bool: ...
    def showDialog(self, state: android.os.Bundle, /) -> None: ...

class ListPreference(DialogPreference):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def findIndexOfValue(self, value: str | java.lang.String, /) -> int: ...
    def getEntries(self) -> java.chaquopy.JavaArray[java.lang.CharSequence]: ...
    def getEntry(self) -> java.lang.CharSequence | None: ...
    def getEntryValues(self) -> java.chaquopy.JavaArray[java.lang.CharSequence]: ...
    def getSummary(self) -> java.lang.CharSequence: ...
    def getValue(self) -> str: ...
    def onDialogClosed(self, positiveResult: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onGetDefaultValue(self, a: android.content.res.TypedArray, index: int | java.jint | java.lang.Integer, /) -> java.lang.Object: ...
    def onPrepareDialogBuilder(self, builder: android.app.AlertDialog.Builder, /) -> None: ...
    def onRestoreInstanceState(self, state: android.os.Parcelable, /) -> None: ...
    def onSaveInstanceState(self) -> android.os.Parcelable: ...
    def onSetInitialValue(self, restoreValue: bool | java.jboolean | java.lang.Boolean, defaultValue: java.lang.Object | int | bool | float | str, /) -> None: ...
    @typing.overload
    def setEntries(self, entriesResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setEntries(self, entries: java.chaquopy.JavaArray[java.lang.CharSequence], /) -> None: ...
    @typing.overload
    def setEntryValues(self, entryValuesResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setEntryValues(self, entryValues: java.chaquopy.JavaArray[java.lang.CharSequence], /) -> None: ...
    def setSummary(self, summary: java.lang.CharSequence, /) -> None: ...
    def setValue(self, value: str | java.lang.String, /) -> None: ...
    def setValueIndex(self, index: int | java.jint | java.lang.Integer, /) -> None: ...

class MultiSelectListPreference(DialogPreference):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def findIndexOfValue(self, value: str | java.lang.String, /) -> int: ...
    def getEntries(self) -> java.chaquopy.JavaArray[java.lang.CharSequence]: ...
    def getEntryValues(self) -> java.chaquopy.JavaArray[java.lang.CharSequence]: ...
    def getValues(self) -> java.util.Set[java.lang.String]: ...
    def onDialogClosed(self, positiveResult: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onGetDefaultValue(self, a: android.content.res.TypedArray, index: int | java.jint | java.lang.Integer, /) -> java.lang.Object: ...
    def onPrepareDialogBuilder(self, builder: android.app.AlertDialog.Builder, /) -> None: ...
    def onSaveInstanceState(self) -> android.os.Parcelable: ...
    def onSetInitialValue(self, restoreValue: bool | java.jboolean | java.lang.Boolean, defaultValue: java.lang.Object | int | bool | float | str, /) -> None: ...
    @typing.overload
    def setEntries(self, entriesResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setEntries(self, entries: java.chaquopy.JavaArray[java.lang.CharSequence], /) -> None: ...
    @typing.overload
    def setEntryValues(self, entryValuesResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setEntryValues(self, entryValues: java.chaquopy.JavaArray[java.lang.CharSequence], /) -> None: ...
    def setValues(self, values: java.util.Set[java.lang.String], /) -> None: ...

class Preference(java.lang.Comparable[Preference]):
    DEFAULT_ORDER: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def callChangeListener(self, newValue: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def compareTo(self, another: Preference, /) -> int: ...
    def findPreferenceInHierarchy(self, key: str | java.lang.String, /) -> Preference: ...
    def getContext(self) -> android.content.Context: ...
    def getDependency(self) -> str: ...
    def getEditor(self) -> android.content.SharedPreferences.Editor: ...
    def getExtras(self) -> android.os.Bundle: ...
    def getFragment(self) -> str: ...
    def getIcon(self) -> android.graphics.drawable.Drawable: ...
    def getIntent(self) -> android.content.Intent: ...
    def getKey(self) -> str: ...
    def getLayoutResource(self) -> int: ...
    def getOnPreferenceChangeListener(self) -> Preference.OnPreferenceChangeListener: ...
    def getOnPreferenceClickListener(self) -> Preference.OnPreferenceClickListener: ...
    def getOrder(self) -> int: ...
    def getParent(self) -> PreferenceGroup | None: ...
    def getPersistedBoolean(self, defaultReturnValue: bool | java.jboolean | java.lang.Boolean, /) -> bool: ...
    def getPersistedFloat(self, defaultReturnValue: float | java.jfloat | java.lang.Float, /) -> float: ...
    def getPersistedInt(self, defaultReturnValue: int | java.jint | java.lang.Integer, /) -> int: ...
    def getPersistedLong(self, defaultReturnValue: int | java.jlong | java.lang.Long, /) -> int: ...
    def getPersistedString(self, defaultReturnValue: str | java.lang.String, /) -> str: ...
    def getPersistedStringSet(self, defaultReturnValue: java.util.Set[java.lang.String], /) -> java.util.Set[java.lang.String]: ...
    def getPreferenceDataStore(self) -> PreferenceDataStore | None: ...
    def getPreferenceManager(self) -> PreferenceManager: ...
    def getSharedPreferences(self) -> android.content.SharedPreferences: ...
    def getShouldDisableView(self) -> bool: ...
    def getSummary(self) -> java.lang.CharSequence: ...
    def getTitle(self) -> java.lang.CharSequence: ...
    def getTitleRes(self) -> int: ...
    def getView(self, convertView: android.view.View, parent: android.view.ViewGroup, /) -> android.view.View: ...
    def getWidgetLayoutResource(self) -> int: ...
    def hasKey(self) -> bool: ...
    def isEnabled(self) -> bool: ...
    def isIconSpaceReserved(self) -> bool: ...
    def isPersistent(self) -> bool: ...
    def isRecycleEnabled(self) -> bool: ...
    def isSelectable(self) -> bool: ...
    def isSingleLineTitle(self) -> bool: ...
    def notifyChanged(self) -> None: ...
    def notifyDependencyChange(self, disableDependents: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def notifyHierarchyChanged(self) -> None: ...
    def onAttachedToActivity(self) -> None: ...
    def onAttachedToHierarchy(self, preferenceManager: PreferenceManager, /) -> None: ...
    def onBindView(self, view: android.view.View, /) -> None: ...
    def onClick(self) -> None: ...
    def onCreateView(self, parent: android.view.ViewGroup, /) -> android.view.View: ...
    def onDependencyChanged(self, dependency: Preference, disableDependent: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onGetDefaultValue(self, a: android.content.res.TypedArray, index: int | java.jint | java.lang.Integer, /) -> java.lang.Object: ...
    def onParentChanged(self, parent: Preference, disableChild: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onPrepareForRemoval(self) -> None: ...
    def onRestoreInstanceState(self, state: android.os.Parcelable, /) -> None: ...
    def onSaveInstanceState(self) -> android.os.Parcelable: ...
    def onSetInitialValue(self, restorePersistedValue: bool | java.jboolean | java.lang.Boolean, defaultValue: java.lang.Object | int | bool | float | str, /) -> None: ...
    def peekExtras(self) -> android.os.Bundle: ...
    def persistBoolean(self, value: bool | java.jboolean | java.lang.Boolean, /) -> bool: ...
    def persistFloat(self, value: float | java.jfloat | java.lang.Float, /) -> bool: ...
    def persistInt(self, value: int | java.jint | java.lang.Integer, /) -> bool: ...
    def persistLong(self, value: int | java.jlong | java.lang.Long, /) -> bool: ...
    def persistString(self, value: str | java.lang.String, /) -> bool: ...
    def persistStringSet(self, values: java.util.Set[java.lang.String], /) -> bool: ...
    def restoreHierarchyState(self, container: android.os.Bundle, /) -> None: ...
    def saveHierarchyState(self, container: android.os.Bundle, /) -> None: ...
    def setDefaultValue(self, defaultValue: java.lang.Object | int | bool | float | str, /) -> None: ...
    def setDependency(self, dependencyKey: str | java.lang.String, /) -> None: ...
    def setEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setFragment(self, fragment: str | java.lang.String, /) -> None: ...
    @typing.overload
    def setIcon(self, iconResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setIcon(self, icon: android.graphics.drawable.Drawable, /) -> None: ...
    def setIconSpaceReserved(self, iconSpaceReserved: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setIntent(self, intent: android.content.Intent, /) -> None: ...
    def setKey(self, key: str | java.lang.String, /) -> None: ...
    def setLayoutResource(self, layoutResId: int | java.jint | java.lang.Integer, /) -> None: ...
    def setOnPreferenceChangeListener(self, onPreferenceChangeListener: Preference.OnPreferenceChangeListener, /) -> None: ...
    def setOnPreferenceClickListener(self, onPreferenceClickListener: Preference.OnPreferenceClickListener, /) -> None: ...
    def setOrder(self, order: int | java.jint | java.lang.Integer, /) -> None: ...
    def setPersistent(self, persistent: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setPreferenceDataStore(self, dataStore: PreferenceDataStore, /) -> None: ...
    def setRecycleEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setSelectable(self, selectable: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setShouldDisableView(self, shouldDisableView: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setSingleLineTitle(self, singleLineTitle: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    @typing.overload
    def setSummary(self, summaryResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setSummary(self, summary: java.lang.CharSequence, /) -> None: ...
    @typing.overload
    def setTitle(self, titleResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setTitle(self, title: java.lang.CharSequence, /) -> None: ...
    def setWidgetLayoutResource(self, widgetLayoutResId: int | java.jint | java.lang.Integer, /) -> None: ...
    def shouldCommit(self) -> bool: ...
    def shouldDisableDependents(self) -> bool: ...
    def shouldPersist(self) -> bool: ...
    def toString(self) -> str: ...

    class OnPreferenceClickListener(java.lang.Object):
        def onPreferenceClick(self, arg1: Preference, /) -> bool: ...

    class OnPreferenceChangeListener(java.lang.Object):
        def onPreferenceChange(self, arg1: Preference, arg2: java.lang.Object | int | bool | float | str, /) -> bool: ...

    class BaseSavedState(android.view.AbsSavedState):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[Preference.BaseSavedState]] = ...
        @typing.overload
        def __init__(self, source: android.os.Parcel, /) -> None: ...
        @typing.overload
        def __init__(self, superState: android.os.Parcelable, /) -> None: ...

class PreferenceActivity(android.app.ListActivity, PreferenceFragment.OnPreferenceStartFragmentCallback):
    EXTRA_NO_HEADERS: typing.ClassVar[str] = ...
    EXTRA_SHOW_FRAGMENT: typing.ClassVar[str] = ...
    EXTRA_SHOW_FRAGMENT_ARGUMENTS: typing.ClassVar[str] = ...
    EXTRA_SHOW_FRAGMENT_SHORT_TITLE: typing.ClassVar[str] = ...
    EXTRA_SHOW_FRAGMENT_TITLE: typing.ClassVar[str] = ...
    HEADER_ID_UNDEFINED: typing.ClassVar[int] = ...
    def __init__(self) -> None: ...
    def addPreferencesFromIntent(self, intent: android.content.Intent, /) -> None: ...
    def addPreferencesFromResource(self, preferencesResId: int | java.jint | java.lang.Integer, /) -> None: ...
    def findPreference(self, key: java.lang.CharSequence, /) -> Preference: ...
    def finishPreferencePanel(self, caller: android.app.Fragment, resultCode: int | java.jint | java.lang.Integer, resultData: android.content.Intent, /) -> None: ...
    def getPreferenceManager(self) -> PreferenceManager: ...
    def getPreferenceScreen(self) -> PreferenceScreen: ...
    def hasHeaders(self) -> bool: ...
    def invalidateHeaders(self) -> None: ...
    def isMultiPane(self) -> bool: ...
    def isValidFragment(self, fragmentName: str | java.lang.String, /) -> bool: ...
    def loadHeadersFromResource(self, resid: int | java.jint | java.lang.Integer, target: java.util.List[PreferenceActivity.Header], /) -> None: ...
    def onActivityResult(self, requestCode: int | java.jint | java.lang.Integer, resultCode: int | java.jint | java.lang.Integer, data: android.content.Intent, /) -> None: ...
    def onBackPressed(self) -> None: ...
    def onBuildHeaders(self, target: java.util.List[PreferenceActivity.Header], /) -> None: ...
    def onBuildStartFragmentIntent(self, fragmentName: str | java.lang.String, args: android.os.Bundle, titleRes: int | java.jint | java.lang.Integer, shortTitleRes: int | java.jint | java.lang.Integer, /) -> android.content.Intent: ...
    def onContentChanged(self) -> None: ...
    def onCreate(self, savedInstanceState: android.os.Bundle, /) -> None: ...
    def onDestroy(self) -> None: ...
    def onGetInitialHeader(self) -> PreferenceActivity.Header: ...
    def onGetNewHeader(self) -> PreferenceActivity.Header: ...
    def onHeaderClick(self, header: PreferenceActivity.Header, position: int | java.jint | java.lang.Integer, /) -> None: ...
    def onIsHidingHeaders(self) -> bool: ...
    def onIsMultiPane(self) -> bool: ...
    def onListItemClick(self, l: android.widget.ListView, v: android.view.View, position: int | java.jint | java.lang.Integer, id: int | java.jlong | java.lang.Long, /) -> None: ...
    def onNewIntent(self, intent: android.content.Intent, /) -> None: ...
    def onOptionsItemSelected(self, item: android.view.MenuItem, /) -> bool: ...
    def onPreferenceStartFragment(self, caller: PreferenceFragment, pref: Preference, /) -> bool: ...
    def onPreferenceTreeClick(self, preferenceScreen: PreferenceScreen, preference: Preference, /) -> bool: ...
    def onRestoreInstanceState(self, state: android.os.Bundle, /) -> None: ...
    def onSaveInstanceState(self, outState: android.os.Bundle, /) -> None: ...
    def onStop(self) -> None: ...
    def setListFooter(self, view: android.view.View, /) -> None: ...
    def setParentTitle(self, title: java.lang.CharSequence, shortTitle: java.lang.CharSequence, listener: android.view.View.OnClickListener, /) -> None: ...
    def setPreferenceScreen(self, preferenceScreen: PreferenceScreen, /) -> None: ...
    def showBreadCrumbs(self, title: java.lang.CharSequence, shortTitle: java.lang.CharSequence, /) -> None: ...
    def startPreferenceFragment(self, fragment: android.app.Fragment, push: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def startPreferencePanel(self, fragmentClass: str | java.lang.String, args: android.os.Bundle, titleRes: int | java.jint | java.lang.Integer, titleText: java.lang.CharSequence, resultTo: android.app.Fragment, resultRequestCode: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def startWithFragment(self, fragmentName: str | java.lang.String, args: android.os.Bundle, resultTo: android.app.Fragment, resultRequestCode: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def startWithFragment(self, fragmentName: str | java.lang.String, args: android.os.Bundle, resultTo: android.app.Fragment, resultRequestCode: int | java.jint | java.lang.Integer, titleRes: int | java.jint | java.lang.Integer, shortTitleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def switchToHeader(self, header: PreferenceActivity.Header, /) -> None: ...
    @typing.overload
    def switchToHeader(self, fragmentName: str | java.lang.String, args: android.os.Bundle, /) -> None: ...

    class Header(android.os.Parcelable):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PreferenceActivity.Header]] = ...
        breadCrumbShortTitle: java.lang.CharSequence = ...
        breadCrumbShortTitleRes: int = ...
        breadCrumbTitle: java.lang.CharSequence = ...
        breadCrumbTitleRes: int = ...
        extras: android.os.Bundle = ...
        fragment: str = ...
        fragmentArguments: android.os.Bundle = ...
        iconRes: int = ...
        id: int = ...
        intent: android.content.Intent = ...
        summary: java.lang.CharSequence = ...
        summaryRes: int = ...
        title: java.lang.CharSequence = ...
        titleRes: int = ...
        def __init__(self) -> None: ...
        def describeContents(self) -> int: ...
        def getBreadCrumbShortTitle(self, res: android.content.res.Resources, /) -> java.lang.CharSequence: ...
        def getBreadCrumbTitle(self, res: android.content.res.Resources, /) -> java.lang.CharSequence: ...
        def getSummary(self, res: android.content.res.Resources, /) -> java.lang.CharSequence: ...
        def getTitle(self, res: android.content.res.Resources, /) -> java.lang.CharSequence: ...
        def readFromParcel(self, in_: android.os.Parcel, /) -> None: ...
        def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PreferenceCategory(PreferenceGroup):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def isEnabled(self) -> bool: ...
    def onPrepareAddPreference(self, preference: Preference, /) -> bool: ...
    def shouldDisableDependents(self) -> bool: ...

class PreferenceDataStore(java.lang.Object):
    def getBoolean(self, key: str | java.lang.String, defValue: bool | java.jboolean | java.lang.Boolean, /) -> bool: ...
    def getFloat(self, key: str | java.lang.String, defValue: float | java.jfloat | java.lang.Float, /) -> float: ...
    def getInt(self, key: str | java.lang.String, defValue: int | java.jint | java.lang.Integer, /) -> int: ...
    def getLong(self, key: str | java.lang.String, defValue: int | java.jlong | java.lang.Long, /) -> int: ...
    def getString(self, key: str | java.lang.String, defValue: str | java.lang.String, /) -> str | None: ...
    def getStringSet(self, key: str | java.lang.String, defValues: java.util.Set[java.lang.String], /) -> java.util.Set[java.lang.String] | None: ...
    def putBoolean(self, key: str | java.lang.String, value: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def putFloat(self, key: str | java.lang.String, value: float | java.jfloat | java.lang.Float, /) -> None: ...
    def putInt(self, key: str | java.lang.String, value: int | java.jint | java.lang.Integer, /) -> None: ...
    def putLong(self, key: str | java.lang.String, value: int | java.jlong | java.lang.Long, /) -> None: ...
    def putString(self, key: str | java.lang.String, value: str | java.lang.String, /) -> None: ...
    def putStringSet(self, key: str | java.lang.String, values: java.util.Set[java.lang.String], /) -> None: ...

class PreferenceFragment(android.app.Fragment):
    def __init__(self) -> None: ...
    def addPreferencesFromIntent(self, intent: android.content.Intent, /) -> None: ...
    def addPreferencesFromResource(self, preferencesResId: int | java.jint | java.lang.Integer, /) -> None: ...
    def findPreference(self, key: java.lang.CharSequence, /) -> Preference: ...
    def getPreferenceManager(self) -> PreferenceManager: ...
    def getPreferenceScreen(self) -> PreferenceScreen: ...
    def onActivityCreated(self, savedInstanceState: android.os.Bundle, /) -> None: ...
    def onActivityResult(self, requestCode: int | java.jint | java.lang.Integer, resultCode: int | java.jint | java.lang.Integer, data: android.content.Intent, /) -> None: ...
    def onCreate(self, savedInstanceState: android.os.Bundle, /) -> None: ...
    def onCreateView(self, inflater: android.view.LayoutInflater, container: android.view.ViewGroup, savedInstanceState: android.os.Bundle, /) -> android.view.View: ...
    def onDestroy(self) -> None: ...
    def onDestroyView(self) -> None: ...
    def onPreferenceTreeClick(self, preferenceScreen: PreferenceScreen, preference: Preference, /) -> bool: ...
    def onSaveInstanceState(self, outState: android.os.Bundle, /) -> None: ...
    def onStart(self) -> None: ...
    def onStop(self) -> None: ...
    def onViewCreated(self, view: android.view.View, savedInstanceState: android.os.Bundle, /) -> None: ...
    def setPreferenceScreen(self, preferenceScreen: PreferenceScreen, /) -> None: ...

    class OnPreferenceStartFragmentCallback(java.lang.Object):
        def onPreferenceStartFragment(self, arg1: PreferenceFragment, arg2: Preference, /) -> bool: ...

class PreferenceGroup(Preference):
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def addItemFromInflater(self, preference: Preference, /) -> None: ...
    def addPreference(self, preference: Preference, /) -> bool: ...
    def dispatchRestoreInstanceState(self, container: android.os.Bundle, /) -> None: ...
    def dispatchSaveInstanceState(self, container: android.os.Bundle, /) -> None: ...
    def findPreference(self, key: java.lang.CharSequence, /) -> Preference: ...
    def getPreference(self, index: int | java.jint | java.lang.Integer, /) -> Preference: ...
    def getPreferenceCount(self) -> int: ...
    def isOnSameScreenAsChildren(self) -> bool: ...
    def isOrderingAsAdded(self) -> bool: ...
    def notifyDependencyChange(self, disableDependents: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onAttachedToActivity(self) -> None: ...
    def onPrepareAddPreference(self, preference: Preference, /) -> bool: ...
    def onPrepareForRemoval(self) -> None: ...
    def removeAll(self) -> None: ...
    def removePreference(self, preference: Preference, /) -> bool: ...
    def setOrderingAsAdded(self, orderingAsAdded: bool | java.jboolean | java.lang.Boolean, /) -> None: ...

class PreferenceManager(java.lang.Object):
    KEY_HAS_SET_DEFAULT_VALUES: typing.ClassVar[str] = ...
    METADATA_KEY_PREFERENCES: typing.ClassVar[str] = ...
    def createPreferenceScreen(self, context: android.content.Context, /) -> PreferenceScreen: ...
    def findPreference(self, key: java.lang.CharSequence, /) -> Preference | None: ...
    @staticmethod
    def getDefaultSharedPreferences(context: android.content.Context, /) -> android.content.SharedPreferences: ...
    @staticmethod
    def getDefaultSharedPreferencesName(context: android.content.Context, /) -> str: ...
    def getPreferenceDataStore(self) -> PreferenceDataStore | None: ...
    def getSharedPreferences(self) -> android.content.SharedPreferences: ...
    def getSharedPreferencesMode(self) -> int: ...
    def getSharedPreferencesName(self) -> str: ...
    def isStorageDefault(self) -> bool: ...
    def isStorageDeviceProtected(self) -> bool: ...
    @typing.overload
    @staticmethod
    def setDefaultValues(context: android.content.Context, resId: int | java.jint | java.lang.Integer, readAgain: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    @typing.overload
    @staticmethod
    def setDefaultValues(context: android.content.Context, sharedPreferencesName: str | java.lang.String, sharedPreferencesMode: int | java.jint | java.lang.Integer, resId: int | java.jint | java.lang.Integer, readAgain: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setPreferenceDataStore(self, dataStore: PreferenceDataStore, /) -> None: ...
    def setSharedPreferencesMode(self, sharedPreferencesMode: int | java.jint | java.lang.Integer, /) -> None: ...
    def setSharedPreferencesName(self, sharedPreferencesName: str | java.lang.String, /) -> None: ...
    def setStorageDefault(self) -> None: ...
    def setStorageDeviceProtected(self) -> None: ...

    class OnActivityStopListener(java.lang.Object):
        def onActivityStop(self) -> None: ...

    class OnActivityResultListener(java.lang.Object):
        def onActivityResult(self, arg1: int | java.jint | java.lang.Integer, arg2: int | java.jint | java.lang.Integer, arg3: android.content.Intent, /) -> bool: ...

    class OnActivityDestroyListener(java.lang.Object):
        def onActivityDestroy(self) -> None: ...

class PreferenceScreen(android.content.DialogInterface.OnDismissListener, PreferenceGroup, android.widget.AdapterView.OnItemClickListener):
    def bind(self, listView: android.widget.ListView, /) -> None: ...
    def getDialog(self) -> android.app.Dialog: ...
    def getRootAdapter(self) -> android.widget.ListAdapter: ...
    def isOnSameScreenAsChildren(self) -> bool: ...
    def onClick(self) -> None: ...
    def onCreateRootAdapter(self) -> android.widget.ListAdapter: ...
    def onDismiss(self, dialog: android.content.DialogInterface, /) -> None: ...
    def onItemClick(self, parent: android.widget.AdapterView, view: android.view.View, position: int | java.jint | java.lang.Integer, id: int | java.jlong | java.lang.Long, /) -> None: ...
    def onRestoreInstanceState(self, state: android.os.Parcelable, /) -> None: ...
    def onSaveInstanceState(self) -> android.os.Parcelable: ...

class RingtonePreference(Preference, PreferenceManager.OnActivityResultListener):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def getRingtoneType(self) -> int: ...
    def getShowDefault(self) -> bool: ...
    def getShowSilent(self) -> bool: ...
    def onActivityResult(self, requestCode: int | java.jint | java.lang.Integer, resultCode: int | java.jint | java.lang.Integer, data: android.content.Intent, /) -> bool: ...
    def onAttachedToHierarchy(self, preferenceManager: PreferenceManager, /) -> None: ...
    def onClick(self) -> None: ...
    def onGetDefaultValue(self, a: android.content.res.TypedArray, index: int | java.jint | java.lang.Integer, /) -> java.lang.Object: ...
    def onPrepareRingtonePickerIntent(self, ringtonePickerIntent: android.content.Intent, /) -> None: ...
    def onRestoreRingtone(self) -> android.net.Uri: ...
    def onSaveRingtone(self, ringtoneUri: android.net.Uri, /) -> None: ...
    def onSetInitialValue(self, restorePersistedValue: bool | java.jboolean | java.lang.Boolean, defaultValueObj: java.lang.Object | int | bool | float | str, /) -> None: ...
    def setRingtoneType(self, type: int | java.jint | java.lang.Integer, /) -> None: ...
    def setShowDefault(self, showDefault: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setShowSilent(self, showSilent: bool | java.jboolean | java.lang.Boolean, /) -> None: ...

class SwitchPreference(TwoStatePreference):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def getSwitchTextOff(self) -> java.lang.CharSequence: ...
    def getSwitchTextOn(self) -> java.lang.CharSequence: ...
    def onBindView(self, view: android.view.View, /) -> None: ...
    @typing.overload
    def setSwitchTextOff(self, resId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setSwitchTextOff(self, offText: java.lang.CharSequence, /) -> None: ...
    @typing.overload
    def setSwitchTextOn(self, resId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setSwitchTextOn(self, onText: java.lang.CharSequence, /) -> None: ...

class TwoStatePreference(Preference):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, attrs: android.util.AttributeSet, defStyleAttr: int | java.jint | java.lang.Integer, defStyleRes: int | java.jint | java.lang.Integer, /) -> None: ...
    def getDisableDependentsState(self) -> bool: ...
    def getSummaryOff(self) -> java.lang.CharSequence: ...
    def getSummaryOn(self) -> java.lang.CharSequence: ...
    def isChecked(self) -> bool: ...
    def onClick(self) -> None: ...
    def onGetDefaultValue(self, a: android.content.res.TypedArray, index: int | java.jint | java.lang.Integer, /) -> java.lang.Object: ...
    def onRestoreInstanceState(self, state: android.os.Parcelable, /) -> None: ...
    def onSaveInstanceState(self) -> android.os.Parcelable: ...
    def onSetInitialValue(self, restoreValue: bool | java.jboolean | java.lang.Boolean, defaultValue: java.lang.Object | int | bool | float | str, /) -> None: ...
    def setChecked(self, checked: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setDisableDependentsState(self, disableDependentsState: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    @typing.overload
    def setSummaryOff(self, summaryResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setSummaryOff(self, summary: java.lang.CharSequence, /) -> None: ...
    @typing.overload
    def setSummaryOn(self, summaryResId: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setSummaryOn(self, summary: java.lang.CharSequence, /) -> None: ...
    def shouldDisableDependents(self) -> bool: ...
