Commit 77894f98 by onuma

#46276 ログインボタンは常に活性化状態とした

parent bf9c1677
......@@ -113,17 +113,6 @@
android:text="@string/login"
android:textColor="@color/text_color"
android:visibility="visible"/>
<Button
android:id="@+id/btn_login_on"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:background="@drawable/btn_login_on"
android:contentDescription="@string/login"
android:text="@string/login"
android:textColor="@color/text_color"
android:visibility="gone"/>
</LinearLayout>
</LinearLayout>
......
......@@ -98,7 +98,6 @@ public class LoginActivity extends ABVLoginActivity {
private InputMethodManager imm;
private Button btnLoginOff;
private Button btnLoginOn;
private Button btnDetail;
private CheckBox chexBoxAgree;
private static String termsOfUseUrl = ABVEnvironment.getInstance().agree_to_terms_of_use_url;
......@@ -157,15 +156,8 @@ public class LoginActivity extends ABVLoginActivity {
}
});
// 活性化したログインボタン。
btnLoginOn = findViewById(R.id.btn_login_on);
btnLoginOn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
tryLogin();
}
});
// 非活性化したログインボタン
// ログインボタン
btnLoginOff = findViewById(R.id.btn_login_off);
btnLoginOff.setVisibility(View.VISIBLE);
btnLoginOff.setOnClickListener(new View.OnClickListener() {
......@@ -180,20 +172,14 @@ public class LoginActivity extends ABVLoginActivity {
// 初期化(状態は保存しておく。ログアウトした後に使う)
boolean agree = PreferenceUtil.getUserPref(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, false);
if (agree) {
btnLoginOn.setVisibility(View.VISIBLE);
btnLoginOff.setVisibility(View.GONE);
chexBoxAgree.setChecked(true);
}
chexBoxAgree.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (chexBoxAgree.isChecked()) {
btnLoginOn.setVisibility(View.VISIBLE);
btnLoginOff.setVisibility(View.GONE);
PreferenceUtil.putUserPref(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, true);
} else {
btnLoginOn.setVisibility(View.GONE);
btnLoginOff.setVisibility(View.VISIBLE);
PreferenceUtil.putUserPref(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, false);
}
}
......@@ -204,9 +190,6 @@ public class LoginActivity extends ABVLoginActivity {
chexBoxAgree.setVisibility(View.GONE);
findViewById(R.id.terms_of_use_text).setVisibility(View.GONE);
findViewById(R.id.detail).setVisibility(View.GONE);
// ログインボタン
btnLoginOff.setVisibility(View.GONE);
btnLoginOn.setVisibility(View.VISIBLE);
}
//androidバジョン6以上からMAC idではなくandroid固有numberを取得ため、ダイアログで表示
......@@ -461,6 +444,17 @@ public class LoginActivity extends ABVLoginActivity {
return false;
}
}
if (StringUtil.isNullOrWhiteSpace(mLoginId)) {
handleErrorMessageToast(ErrorCode.E001);
mEdtLoginId.requestFocus();
return false;
}
if (StringUtil.isNullOrWhiteSpace(mPassword)) {
handleErrorMessageToast(ErrorCode.E002);
mEdtPassword.requestFocus();
return false;
}
if (!StringUtil.isNullOrEmpty(termsOfUseUrl)) {
if (!chexBoxAgree.isChecked()) {
......
Markdown is supported
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