public boolean isFormValidated(Profiles profileData, boolean shippingAddressVisible, boolean guestCheckout) {
if (guestCheckout && profileData.getBEmailError() != null && !profileData.getBEmailError().isEmpty()) {
mBinding.billingAddressForm.addBookEmailTitlelayout.setFocusable(true);
mBinding.billingAddressForm.addBookEmailTitlelayout.requestFocus();
Helper.scrollToView(mBinding.scrollView, mBinding.billingAddressForm.addBookEmailTitlelayout );
return false;
}
if (profileData.getBFirstname().isEmpty()) {
mBinding.billingAddressForm.addBookfirstnamelayout.setFocusable(true);
mBinding.billingAddressForm.addBookfirstnamelayout.requestFocus();
Helper.scrollToView(mBinding.scrollView, mBinding.billingAddressForm.addBookfirstnamelayout );
return false;
}else if (profileData.getBLastname().isEmpty()) {
mBinding.billingAddressForm.addBooklastnamelayout.setFocusable(true);
mBinding.billingAddressForm.addBooklastnamelayout.requestFocus();
Helper.scrollToView(mBinding.scrollView, mBinding.billingAddressForm.addBooklastnamelayout );
return false;
} else if (profileData.getBAddress().isEmpty()) {
mBinding.billingAddressForm.addBookStreetAddlayout.setFocusable(true);
mBinding.billingAddressForm.addBookStreetAddlayout.requestFocus();
Helper.scrollToView(mBinding.scrollView, mBinding.billingAddressForm.addBookStreetAddlayout );
return false;
}
// ------------------add your more code ------------------------------
}
Be the first to comment.