Code example for EditTextPreference

Methods: setOnPreferenceChangeListener

0
     
    private void setListeners() { 
    	mFiltersEventType.setOnPreferenceChangeListener(this);
    	 
    	mMaxEvents.setOnPreferenceChangeListener(this);
        mEventRadius.setOnPreferenceChangeListener(this);
        mServerIP.setOnPreferenceChangeListener(this);
        mServerPort.setOnPreferenceChangeListener(this);
         
        mEnableCompass.setOnPreferenceChangeListener(this);
        mEnableMyLocation.setOnPreferenceChangeListener(this);
    } 
     
    private void setPreValues() { 
    	mFiltersEventType.setSummary(InfoCityPreferences.eventTypeFilter(this).toString());
    	 
    	mMaxEvents.setSummary(InfoCityPreferences.getMaxEvents(this)+"");
        mEventRadius.setSummary(InfoCityPreferences.getEventMaxRadius(this) + "m");
        mServerIP.setSummary(InfoCityPreferences.getServerIP(this));
        mServerPort.setSummary(InfoCityPreferences.getServerPort(this)+"");
Contextual code suggestions in your IDE  Get Codota for Java