0

登录屏幕图像

在登录屏幕中,如果我在输入电子邮件和密码后按软键盘输入。登录屏幕的下部黑了一段时间这里我附上屏幕截图请看

public void loginButtonClickListener(final View view) {
    emailTextBox = (EditText) findViewById(R.id.emailLogin);
    passwordTextBox = (EditText) findViewById(R.id.passwordLogin);
    emailText = emailTextBox.getText().toString().trim();

    SharedPreferences settings = getSharedPreferences("Lisnx", 0);
    SharedPreferences.Editor editor = settings.edit();
    editor.putString("useremail", emailText);
    editor.commit();

    passwordText = passwordTextBox.getText().toString();
    if (emailText == null || emailText.length() == 0) {
        CustomToast.showCustomToast(this,
                Constants.USER_EMAIL_FIELD_EMPTY_ERROR,
                Constants.TOAST_VISIBLE_SHORT, layoutInflater);
        emailTextBox.requestFocus();
        return;
    } else if (passwordText == null || passwordText.length() == 0) {
        CustomToast.showCustomToast(this,
                Constants.PASSWORD_FIELD_EMPTY_ERROR,
                Constants.TOAST_VISIBLE_SHORT, layoutInflater);
        passwordTextBox.requestFocus();
        return;
    }

    try {
        InputMethodManager inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
        inputManager.hideSoftInputFromWindow(this.getCurrentFocus()
                .getWindowToken(), 0);
    } catch (Exception e) {
    }

    pd = ProgressDialog.show(this, null,
            this.getResources().getString(R.string.authenticateUser), true);

    authenticateUser(view);
}
4

0 回答 0