This commit is contained in:
Thomas 2020-07-04 18:07:01 +02:00
parent edcab6e9ec
commit 628e62d2ac
1 changed files with 10 additions and 0 deletions

View File

@ -126,6 +126,16 @@ public class LoginActivity extends AppCompatActivity implements OnRetrievePeertu
login_passwd = findViewById(R.id.login_passwd);
connectionButton = findViewById(R.id.login_button);
login_uid.setOnFocusChangeListener((v, hasFocus) -> {
if( !hasFocus) {
if (android.util.Patterns.EMAIL_ADDRESS.matcher(login_uid.getText().toString().trim()).matches()) {
String[] emailArray = login_uid.getText().toString().split("@");
if (emailArray.length > 1 && Arrays.asList(Helper.openid).contains(emailArray[1])) {
connectionButton.callOnClick();
}
}
}
});
LinearLayout connected = findViewById(R.id.connected);
LinearLayout not_connected = findViewById(R.id.not_connected);