Android PreferenceGroup - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android PreferenceGroup class.

This code example shows how to use the following methods:findPreference
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:findPreference
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:findPreference
        return preferenceScreen;
    } 
 
    @Implementation 
    public Preference findPreference(CharSequence key) {
        return preferenceScreen.findPreference(key);
    } 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:findPreference, removePreference
        mVibratePref.setChecked(Settings.getVibrate());
        mPredictionPref.setChecked(Settings.getPrediction());
    } 
 
    public void updatePreference(PreferenceGroup parentPref, String prefKey) {
        Preference preference = parentPref.findPreference(prefKey);
        if (preference == null) {
            return; 
        } 
        Intent intent = preference.getIntent();
        if (intent != null) {
            PackageManager pm = getPackageManager();
            List<ResolveInfo> list = pm.queryIntentActivities(intent, 0);
            int listSize = list.size();
            if (listSize == 0)
                parentPref.removePreference(preference);
        } 
    } 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addPreference, findPreference, removePreference
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setEnabled
                return; 
            } 
        } 
        mBackup.setChecked(enable);
        mAutoRestore.setEnabled(enable);
        mConfigure.setEnabled(enable);
    } 
 
    @Override 
    protected int getHelpResource() { 
        return R.string.help_url_backup_reset; 
    } 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addPreference
        } 
    } 
     
    private ShortcutPreference createPreference(char shortcut) {
        ShortcutPreference pref = new ShortcutPreference(QuickLaunchSettings.this, shortcut);
        mShortcutGroup.addPreference(pref);
        mShortcutToPreference.put(shortcut, pref);
        return pref;
    } 
 
    private void initShortcutPreferences() { 
         
        /** Whether the shortcut has been seen already.  The array index is the shortcut. */ 
        SparseBooleanArray shortcutSeen = new SparseBooleanArray();
        KeyCharacterMap keyMap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD);
 
        // Go through all the key codes and create a preference for the appropriate keys 
        for (int keyCode = KeyEvent.getMaxKeyCode() - 1; keyCode >= 0; keyCode--) {
            // Get the label for the primary char on the key that produces this key code 
            char shortcut = (char) Character.toLowerCase(keyMap.getDisplayLabel(keyCode));
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:findPreference
This code example shows how to use the following methods:setEnabled
        websiteSettings.setEnabled(false);
        WebStorage.getInstance().getOrigins(new ValueCallback<Map>() {
            @Override 
            public void onReceiveValue(Map webStorageOrigins) {
                if ((webStorageOrigins != null) && !webStorageOrigins.isEmpty()) {
                    websiteSettings.setEnabled(true);
                } 
            } 
        }); 
        GeolocationPermissions.getInstance().getOrigins(new ValueCallback<Set<String> >() {
            @Override 
            public void onReceiveValue(Set<String> geolocationOrigins) {
                if ((geolocationOrigins != null) && !geolocationOrigins.isEmpty()) {
                    websiteSettings.setEnabled(true);
                } 
            } 
        }); 
    } 
 
    @Override 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getContext, addPreference
        super(p);
    } 
 
    @Override 
    protected void loadExtraPreferencesTo(PreferenceGroup subpanel) {
        Context c = subpanel.getContext();
        subpanel.addPreference(createSecretPreference(c));
        subpanel.addPreference(createSecretStringPreference(c));
 
        L2tpProfile profile = (L2tpProfile) getProfile();
    } 
 
    @Override 
    public String validate() {
        String result = super.validate();
        if (!mSecret.isChecked()) return result;
 
        return ((result != null) ? result : mSecretHandler.validate());
    } 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Android PreferenceGroup Questions & Answers:

See Code Examples for Android PreferenceGroup Methods: