Good afternoon tell me
The algorithm of the application is as follows.
First launch of the application
when you click on the onClickPhoto button, AutoCompleteTextView appears next to the variable name = mAutoComplete.getText (). toString (); a value is assigned when you click a second time on the onClickPhoto button, the condition is checked and the rest of the code works.
But all this only works when you first start the application. If you continue to work in it without restarting, then when you click on the onClickPhoto button, the action will immediately proceed to test the conditions. How to make everything repeat again?
public void onClickPhoto(View view) { name=null;//пытаюсь обнулять mAutoComplete.setVisibility(AutoCompleteTextView.VISIBLE); name = mAutoComplete.getText().toString(); //button3.setVisibility(Button.VISIBLE); if (!TextUtils.isEmpty(name)) {рабочий код}
mAutoComplete.setText(null);- Yuriy SPb ♦