Commit 359e5116 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Don't allow saving if the name is only spaces

parent 46d85314
......@@ -190,6 +190,22 @@ public class DNSCreationDialog extends UtilityDialog {
}
});
ed_name.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
if(s.toString().trim().equals("")) met_name.setIndicatorState(MaterialEditText.IndicatorState.INCORRECT);
}
});
}
private boolean isConfigurationValid() {
......
......@@ -205,7 +205,7 @@ public class ConfigureActivity extends AppCompatActivity {
@Override
public void afterTextChanged(Editable s) {
if(s.toString().trim().equals("")) met_name.setIndicatorState(MaterialEditText.IndicatorState.INCORRECT);
}
});
final Preferences preferences = Preferences.getInstance(this);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment