Clear the SMS text field if the user removes the old number.

This commit is contained in:
SMUSTAF1 2017-09-20 13:54:05 +02:00
parent 0113092023
commit 81fe9ebdcc

View file

@ -10,6 +10,7 @@ import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceGroup;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import info.nightscout.androidaps.events.EventPreferenceChange;
import info.nightscout.androidaps.events.EventRefreshGui;
@ -73,6 +74,9 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
((EditTextPreference) pref).setDialogMessage(editTextPref.getDialogMessage());
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) {
EditTextPreference editTextPref = (EditTextPreference) pref;