IT. Expert System.

Android Reference

RingtonePreference


android.preference

Class RingtonePreference

    • Constructor Detail

      • RingtonePreference

        public RingtonePreference(Context context,
                          AttributeSet attrs,
                          int defStyle)
      • RingtonePreference

        public RingtonePreference(Context context)
    • Method Detail

      • getRingtoneType

        public int getRingtoneType()
        Returns the sound type(s) that are shown in the picker.
        Returns:
        The sound type(s) that are shown in the picker.
        See Also:
        setRingtoneType(int)
      • setRingtoneType

        public void setRingtoneType(int type)
        Sets the sound type(s) that are shown in the picker.
        Parameters:
        type - The sound type(s) that are shown in the picker.
        See Also:
        RingtoneManager.EXTRA_RINGTONE_TYPE
      • getShowDefault

        public boolean getShowDefault()
        Returns whether to a show an item for the default sound/ringtone.
        Returns:
        Whether to show an item for the default sound/ringtone.
      • setShowDefault

        public void setShowDefault(boolean showDefault)
        Sets whether to show an item for the default sound/ringtone. The default to use will be deduced from the sound type(s) being shown.
        Parameters:
        showDefault - Whether to show the default or not.
        See Also:
        RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT
      • getShowSilent

        public boolean getShowSilent()
        Returns whether to a show an item for 'Silent'.
        Returns:
        Whether to show an item for 'Silent'.
      • onPrepareRingtonePickerIntent

        protected void onPrepareRingtonePickerIntent(Intent ringtonePickerIntent)
        Prepares the intent to launch the ringtone picker. This can be modified to adjust the parameters of the ringtone picker.
        Parameters:
        ringtonePickerIntent - The ringtone picker intent that can be modified by putting extras.
      • onSaveRingtone

        protected void onSaveRingtone(Uri ringtoneUri)
        Called when a ringtone is chosen.

        By default, this saves the ringtone URI to the persistent storage as a string.

        Parameters:
        ringtoneUri - The chosen ringtone's Uri. Can be null.
      • onRestoreRingtone

        protected Uri onRestoreRingtone()
        Called when the chooser is about to be shown and the current ringtone should be marked. Can return null to not mark any ringtone.

        By default, this restores the previous ringtone URI from the persistent storage.

        Returns:
        The ringtone to be marked as the current ringtone.
      • 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).

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

        protected void onSetInitialValue(boolean restorePersistedValue,
                             Object defaultValueObj)
        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.

        Overrides:
        onSetInitialValue in class Preference
        Parameters:
        restorePersistedValue - True to restore the persisted value; false to use the given defaultValue.
        defaultValueObj - The default value for this Preference. Only use this if restorePersistedValue is false.
      • onAttachedToHierarchy

        protected void onAttachedToHierarchy(PreferenceManager preferenceManager)
        Description copied from class: Preference
        Called when this Preference has been attached to a Preference hierarchy. Make sure to call the super implementation.
        Overrides:
        onAttachedToHierarchy in class Preference
        Parameters:
        preferenceManager - The PreferenceManager of the hierarchy.


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: 3183 / . Delta: 0.05194 с