Clear the SMS text field if the user removes the old number.
This commit is contained in:
parent
0113092023
commit
81fe9ebdcc
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,7 @@ import android.preference.PreferenceActivity;
|
||||||
import android.preference.PreferenceFragment;
|
import android.preference.PreferenceFragment;
|
||||||
import android.preference.PreferenceGroup;
|
import android.preference.PreferenceGroup;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||||
|
@ -73,6 +74,9 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
||||||
((EditTextPreference) pref).setDialogMessage(editTextPref.getDialogMessage());
|
((EditTextPreference) pref).setDialogMessage(editTextPref.getDialogMessage());
|
||||||
pref.setSummary(editTextPref.getText());
|
pref.setSummary(editTextPref.getText());
|
||||||
}
|
}
|
||||||
|
else if(pref.getKey().contains("smscommunicator_allowednumbers") && TextUtils.isEmpty(editTextPref.getText().toString().trim())){
|
||||||
|
pref.setSummary(MainApp.sResources.getString(R.string.smscommunicator_allowednumbers_summary));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (pref instanceof MultiSelectListPreference) {
|
if (pref instanceof MultiSelectListPreference) {
|
||||||
EditTextPreference editTextPref = (EditTextPreference) pref;
|
EditTextPreference editTextPref = (EditTextPreference) pref;
|
||||||
|
|
Loading…
Reference in a new issue