Use email domain name for identity auto discovery

This commit is contained in:
M66B 2019-08-13 11:43:34 +02:00
parent c7050030ea
commit 3012584eae
1 changed files with 19 additions and 0 deletions

View File

@ -259,6 +259,25 @@ public class FragmentIdentity extends FragmentBase {
}
});
etEmail.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
String email = editable.toString();
if (email.contains("@"))
etDomain.setText(email.split("@")[1]);
else
etDomain.setText(null);
}
});
setColor(color);
btnColor.setOnClickListener(new View.OnClickListener() {
@Override