In Appendix 2, EditText, when you click on 1 EditText, the focus opens, so to speak, and when you click on the button, it moves to a new activity. When I click on 2 EditText, I just enter the numbers and when I click on the button, the new activity is not opened, because the 1 EditText is not filled. How to make 2 independent of the other. Code xml: http://pastebin.com/8RNjpguX
mDone.setOnClickListener (e -> {
//TODO Сделать оплату if (mVinEdit.hasFocus() || mVinEdit.getVisibility() == View.VISIBLE) { int length = mVinEdit.getText().length(); if (numbersOff(length) == false) { mVinEdit.setError(getString(R.string.fail_vin)); } else if(numbersOff(length) == true) { intent = new Intent(MainScreenActivity.this, VinCheckActivity.class); intent.putExtra(getString(R.string.vin_data_tag), mVinEdit.getText().toString()); startActivity(intent); //there need translate token intent } } else if (mPhoneEdit.hasFocus() || mPhoneEdit.getVisibility() == View.VISIBLE) { int length = mPhoneEdit.getText().length(); if (length != 10) { mPhoneEdit.setError(getString(R.string.fail_phone)); } else { intent = new Intent(MainScreenActivity.this, PhoneCheckActivity.class); intent.putExtra(getString(R.string.phone_tag), "7" + mPhoneEdit.getText().toString()); startActivity(intent); } } clear(); hideSoftKeyboard(); }); } 

intentthrough theintent, right? The other one has the markup that you specify. I do not understand what the problem is. IfEditTextis not enough, add the second activation to the XML and place the necessary data in theintent, and pull out viagetExtras()- Silento