Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/fragments/SettingsFragment.java
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | ||||
| setPreferencesFromResource(R.xml.preferences,rootKey); | setPreferencesFromResource(R.xml.preferences,rootKey); | ||||
| /*EditTextPreference editPref = findPreference(getString(R.string.pref_key_num_recents)); | /*EditTextPreference editPref = findPreference(getString(R.string.pref_key_num_recents)); | ||||
| editPref.setOnBindEditTextListener(editText -> { | editPref.setOnBindEditTextListener(editText -> { | ||||
| editText.setInputType(InputType.TYPE_CLASS_NUMBER); | editText.setInputType(InputType.TYPE_CLASS_NUMBER); | ||||
| editText.setSelection(0,editText.getText().length()); | editText.setSelection(0,editText.getText().length()); | ||||
| }); | }); | ||||
| */ | */ | ||||
| //ListPreference preference = findPreference(R.string.arrival_times) | |||||
| } | } | ||||
| @Override | @Override | ||||
| public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { | public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { | ||||
| Preference pref = findPreference(key); | Preference pref = findPreference(key); | ||||
| Log.d(TAG,"Preference key "+key+" changed"); | Log.d(TAG,"Preference key "+key+" changed"); | ||||
| //sometimes this happens | //sometimes this happens | ||||
| ▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines | |||||
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register