Merge pull request #424 from samihusseingit/clear_SMS_number_field

Clear sms number field
This commit is contained in:
Milos Kozak 2017-09-22 15:40:50 +02:00 committed by GitHub
commit 2972b48d5a

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,7 +74,10 @@ 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;
pref.setSummary(editTextPref.getText());