FileDocCategorySizeDatePackage
PhysicalKeyboardSettings.javaAPI DocAndroid 1.5 API2751Wed May 06 22:42:48 BST 2009com.android.settings

PhysicalKeyboardSettings

public class PhysicalKeyboardSettings extends android.preference.PreferenceActivity

Fields Summary
private final String[]
mSettingsUiKey
private final String[]
mSettingsSystemId
private final int[]
mSettingsDefault
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle icicle)


    
        
        super.onCreate(icicle);

        addPreferencesFromResource(R.xml.keyboard_settings);
    
public booleanonPreferenceTreeClick(android.preference.PreferenceScreen preferenceScreen, android.preference.Preference preference)


        // Physical keyboard stuff
        for (int i = 0; i < mSettingsUiKey.length; i++) {
            if (mSettingsUiKey[i].equals(preference.getKey())) {
                System.putInt(getContentResolver(), mSettingsSystemId[i], 
                        ((CheckBoxPreference)preference).isChecked()? 1 : 0);
                return true;
            }
        }

        return super.onPreferenceTreeClick(preferenceScreen, preference);
    
protected voidonResume()

        super.onResume();
        ContentResolver resolver = getContentResolver();
        for (int i = 0; i < mSettingsUiKey.length; i++) {
            CheckBoxPreference pref = (CheckBoxPreference) findPreference(mSettingsUiKey[i]);
            pref.setChecked(System.getInt(resolver, mSettingsSystemId[i],
                                          mSettingsDefault[i]) > 0);
        }