I have two EditTexts. EditText1 and EditText2
I also have a feature that hides EditText2 depending on which option you choose.
The problem is that if you are focusing on EditText2 and run setVisibility(View.GONE) on it then it automatically reverts focus back to EditText1 which does other stuff.
How can I prevent any focus events and just keep everything the same?
I've tried
EditText2.setFocusableInTouchMode(true);
EditText2.setFocusable(true);
EditText2.setFocusableInTouchMode(false);
EditText2.setFocusable(false);
While they disable focus on EditText2 As soon as visibility is set to gone, EditText1 receives focus