Code example for ListPreference

Methods: getEntrysetSummarysetValuesetOnPreferenceChangeListener

     * @return The {@link ListPreference} instance identified by {@code key}. 
    protected ListPreference setupListPreference(final String key, final String value)
        final ListPreference prefView = (ListPreference) findPreference(key);
        prefView.setOnPreferenceChangeListener(new PreferenceChangeListener(prefView));
        return prefView;
     * Initialize a given {@link ListPreference} instance. 
     * @param prefView 
     *         The {@link ListPreference} instance to initialize. 
     * @param value 
     *         Initial value for the {@link ListPreference} object. 
     * @param entries 
     *         Sets the human-readable entries to be shown in the list. 
Stop searching for code, let great code find you!  Add Codota to your java IDE