IT. Expert System.

Android Reference



Class MultiCheckPreference

    • Constructor Detail

      • MultiCheckPreference

        public MultiCheckPreference(Context context)
    • Method Detail

      • setEntries

        public void setEntries(CharSequence[] entries)
        Sets the human-readable entries to be shown in the list. This will be shown in subsequent dialogs.

        Each entry must have a corresponding index in #setEntryValues(CharSequence[]).

        entries - The entries.
        See Also:
      • setEntries

        public void setEntries(int entriesResId)
        entriesResId - The entries array as a resource.
        See Also:
      • getEntries

        public CharSequence[] getEntries()
        The list of entries to be shown in the list in subsequent dialogs.
        The list as an array.
      • setEntryValues

        public void setEntryValues(String[] entryValues)
        The array to find the value to save for a preference when an entry from entries is selected. If a user clicks on the second item in entries, the second item in this array will be saved to the preference.
        entryValues - The array to be used as values to save for the preference.
      • setEntryValues

        public void setEntryValues(int entryValuesResId)
        entryValuesResId - The entry values array as a resource.
        See Also:
      • getEntryValues

        public String[] getEntryValues()
        Returns the array of values to be saved for the preference.
        The array of values.
      • getValue

        public boolean getValue(int index)
        Get the boolean state of a given value.
      • setValue

        public void setValue(int index,
                    boolean state)
        Set the boolean state of a given value.
      • setValues

        public void setValues(boolean[] values)
        Sets the current values.
      • setSummary

        public void setSummary(CharSequence summary)
        Sets the summary for this Preference with a CharSequence. If the summary has a String formatting marker in it (i.e. "%s" or "%1$s"), then the current entry value will be substituted in its place when it's retrieved.
        setSummary in class Preference
        summary - The summary for the preference.
      • getValues

        public boolean[] getValues()
        Returns the currently selected values.
      • findIndexOfValue

        public int findIndexOfValue(String value)
        Returns the index of the given value (in the entry values array).
        value - The value whose index should be returned.
        The index of the value, or -1 if not found.
      • onPrepareDialogBuilder

        protected void onPrepareDialogBuilder(AlertDialog.Builder builder)
        Description copied from class: DialogPreference
        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().

        onPrepareDialogBuilder in class DialogPreference
      • onDialogClosed

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

        protected Object onGetDefaultValue(TypedArray a,
                               int index)
        Description copied from class: Preference
        Called when a Preference is being inflated and the default value attribute needs to be read. Since different Preference types have different value types, the subclass should get and return the default value which will be its value type.

        For example, if the value type is String, the body of the method would proxy to TypedArray.getString(int).

        onGetDefaultValue in class Preference
        a - The set of attributes.
        index - The index of the default value attribute.
        The default value of this preference type.
      • onSetInitialValue

        protected void onSetInitialValue(boolean restoreValue,
                             Object defaultValue)
        Description copied from class: Preference
        Implement this to set the initial value of the Preference.

        If restorePersistedValue is true, you should restore the Preference value from the SharedPreferences. If restorePersistedValue is false, you should set the Preference value to defaultValue that is given (and possibly store to SharedPreferences if Preference.shouldPersist() is true).

        This may not always be called. One example is if it should not persist but there is no default value given.

        onSetInitialValue in class Preference
        restoreValue - True to restore the persisted value; false to use the given defaultValue.
        defaultValue - The default value for this Preference. Only use this if restorePersistedValue is false.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








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

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: 263 / 158778277. Delta: 0.03569 с