Example usage for android.preference MultiSelectListPreference setEnabled

List of usage examples for android.preference MultiSelectListPreference setEnabled

Introduction

In this page you can find the example usage for android.preference MultiSelectListPreference setEnabled.

Prototype

public void setEnabled(boolean enabled) 

Source Link

Document

Sets whether this Preference is enabled.

Usage

From source file:fr.s13d.photobackup.preferences.PBPreferenceFragment.java

private void fillBuckets() {
    this.bucketNames = PBApplication.getMediaStore().getBucketData();

    final CharSequence[] ids = this.bucketNames.values().toArray(new CharSequence[this.bucketNames.size()]);
    final CharSequence[] names = this.bucketNames.keySet().toArray(new CharSequence[this.bucketNames.size()]);

    final MultiSelectListPreference bucketListPreference = (MultiSelectListPreference) findPreference(
            PBConstants.PREF_PICTURE_FOLDER_LIST);
    bucketListPreference.setEntries(ids);
    bucketListPreference.setEnabled(true);
    bucketListPreference.setEntryValues(names);

    setSummaries();/*w  w  w  .ja v  a2  s. c  om*/
}