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

enter image description here enter image description here

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(); }); } 
  • What does it mean independent from the other? They are basically independent, two different activations. - Silento
  • @Asgard I brought you screenshots, you see that when you click on 1 Edit, the second one is hidden, and when you click on 2, it is not hidden. - Martinez Toni
  • You go through another intent through the intent , right? The other one has the markup that you specify. I do not understand what the problem is. If EditText is not enough, add the second activation to the XML and place the necessary data in the intent , and pull out via getExtras() - Silento
  • @Asgard would be great if you suggested how to insert text with a long tab - Martinez Toni
  • @Asgard yes, you do not understand, when you click on 1 edit and enter the number and when you click on the button it is ready, it switches to a new activity. When you click on 2 edits and click on the button is ready, it does not switch to a new activity, but why not? Because 1 edit is not hidden. - Martinez Toni

0