IT. Expert System.

Android Reference

DialogPreference


android.preference

Class DialogPreference

    • Method Detail

      • setDialogTitle

        public void setDialogTitle(CharSequence dialogTitle)
        Sets the title of the dialog. This will be shown on subsequent dialogs.
        Parameters:
        dialogTitle - The title.
      • setDialogTitle

        public void setDialogTitle(int dialogTitleResId)
        Parameters:
        dialogTitleResId - The dialog title as a resource.
        See Also:
        setDialogTitle(CharSequence)
      • getDialogTitle

        public CharSequence getDialogTitle()
        Returns the title to be shown on subsequent dialogs.
        Returns:
        The title.
      • setDialogMessage

        public void setDialogMessage(CharSequence dialogMessage)
        Sets the message of the dialog. This will be shown on subsequent dialogs.

        This message forms the content View of the dialog and conflicts with list-based dialogs, for example. If setting a custom View on a dialog via setDialogLayoutResource(int), include a text View with ID android.R.id#message and it will be populated with this message.

        Parameters:
        dialogMessage - The message.
      • setDialogMessage

        public void setDialogMessage(int dialogMessageResId)
        Parameters:
        dialogMessageResId - The dialog message as a resource.
        See Also:
        setDialogMessage(CharSequence)
      • getDialogMessage

        public CharSequence getDialogMessage()
        Returns the message to be shown on subsequent dialogs.
        Returns:
        The message.
      • setDialogIcon

        public void setDialogIcon(Drawable dialogIcon)
        Sets the icon of the dialog. This will be shown on subsequent dialogs.
        Parameters:
        dialogIcon - The icon, as a Drawable.
      • setDialogIcon

        public void setDialogIcon(int dialogIconRes)
        Sets the icon (resource ID) of the dialog. This will be shown on subsequent dialogs.
        Parameters:
        dialogIconRes - The icon, as a resource ID.
      • getDialogIcon

        public Drawable getDialogIcon()
        Returns the icon to be shown on subsequent dialogs.
        Returns:
        The icon, as a Drawable.
      • setPositiveButtonText

        public void setPositiveButtonText(CharSequence positiveButtonText)
        Sets the text of the positive button of the dialog. This will be shown on subsequent dialogs.
        Parameters:
        positiveButtonText - The text of the positive button.
      • setPositiveButtonText

        public void setPositiveButtonText(int positiveButtonTextResId)
        Parameters:
        positiveButtonTextResId - The positive button text as a resource.
        See Also:
        setPositiveButtonText(CharSequence)
      • getPositiveButtonText

        public CharSequence getPositiveButtonText()
        Returns the text of the positive button to be shown on subsequent dialogs.
        Returns:
        The text of the positive button.
      • setNegativeButtonText

        public void setNegativeButtonText(CharSequence negativeButtonText)
        Sets the text of the negative button of the dialog. This will be shown on subsequent dialogs.
        Parameters:
        negativeButtonText - The text of the negative button.
      • setNegativeButtonText

        public void setNegativeButtonText(int negativeButtonTextResId)
        Parameters:
        negativeButtonTextResId - The negative button text as a resource.
        See Also:
        setNegativeButtonText(CharSequence)
      • getNegativeButtonText

        public CharSequence getNegativeButtonText()
        Returns the text of the negative button to be shown on subsequent dialogs.
        Returns:
        The text of the negative button.
      • setDialogLayoutResource

        public void setDialogLayoutResource(int dialogLayoutResId)
        Sets the layout resource that is inflated as the View to be shown as the content View of subsequent dialogs.
        Parameters:
        dialogLayoutResId - The layout resource ID to be inflated.
        See Also:
        setDialogMessage(CharSequence)
      • getDialogLayoutResource

        public int getDialogLayoutResource()
        Returns the layout resource that is used as the content View for subsequent dialogs.
        Returns:
        The layout resource.
      • onPrepareDialogBuilder

        protected void onPrepareDialogBuilder(AlertDialog.Builder builder)
        Prepares the dialog builder to be shown when the preference is clicked. Use this to set custom properties on the dialog.

        Do not AlertDialog.Builder#create() or AlertDialog.Builder#show().

      • showDialog

        protected void showDialog(Bundle state)
        Shows the dialog associated with this Preference. This is normally initiated automatically on clicking on the preference. Call this method if you need to show the dialog on some other event.
        Parameters:
        state - Optional instance state to restore on the dialog
      • needInputMethod

        protected boolean needInputMethod()
        Returns whether the preference needs to display a soft input method when the dialog is displayed. Default is false. Subclasses should override this method if they need the soft input method brought up automatically.
      • onCreateDialogView

        protected View onCreateDialogView()
        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:
        The content View for the dialog.
        See Also:
        Preference.setLayoutResource(int)
      • onBindDialogView

        protected void onBindDialogView(View view)
        Binds views in the content View of the dialog to data.

        Make sure to call through to the superclass implementation.

        Parameters:
        view - The content View of the dialog, if it is custom.
      • onDialogClosed

        protected void onDialogClosed(boolean positiveResult)
        Called when the dialog is dismissed and should be used to save data to the SharedPreferences.
        Parameters:
        positiveResult - Whether the positive button was clicked (true), or the negative button was clicked or the dialog was canceled (false).
      • getDialog

        public Dialog getDialog()
        Gets the dialog that is shown by this preference.
        Returns:
        The dialog, or null if a dialog is not being shown.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1029 / . Delta: 0.02280 с