} catch (NumberFormatException e) { updatePeriodPref.setSummary("1000 ms"); updatePeriodPref.setText("1000"); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(s, "1000"); } catch (NumberFormatException e) { sensorGainPref.setSummary("1"); sensorGainPref.setText("1"); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(KEY_LUX_SENSOR_GAIN, "1"); } catch (NumberFormatException e) { higLimitPref.setSummary("2000 Lx"); higLimitPref.setText("2000"); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(KEY_HIGH_LIMIT, "2000");
} catch (NumberFormatException e) { updatePeriodPref.setSummary("1000 ms"); updatePeriodPref.setText("1000"); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(s, "1000"); highLimitPref.setText("1.1"); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(KEY_HIGH_LIMIT, "1.1");
@Override public void setText(String text) { super.setText(text); syncSumary(); }
private void updateViews() { mCaptchaHideOnLocked.setChecked(mSettings.isCaptchaHideOnLocked()); mCaptchaOverrideDefaultAction.setChecked(mSettings.isCaptchaOverrideDefaultAction()); mCaptchaPostCopyAction.setValue(String.valueOf(mSettings.getCaptchaPostCopyAction())); mCaptchaIdentifyPattern.setText(mSettings.getCaptchaIdentifyPattern()); mCaptchaParsePattern.setText(mSettings.getCaptchaParsePattern()); mSubscribeIdentityPattern.setText(mSettings.getSubscribeIdentifyPattern()); if ( Build.VERSION.SDK_INT < Build.VERSION_CODES.O ) ((ListPreference)mSubscribePriority).setValue(String.valueOf(mSettings.getSubscribePriority())); getPreferenceScreen().setEnabled(true); }
}); mPreference.setSummary(currentServer); mPreference.setText(currentServer);