In the application on Android I use 10 buttons and focus when clicking the button.
If I select button 1, it becomes in focus, if I select button 2, then there are already two buttons in focus. I need to take the buttons one by one into focus, that is, if I select button 2, then the first one loses the focus, and the second one appears.
Code for buttons:
View.OnTouchListener list = new View.OnTouchListener() { public boolean onTouch(View view, MotionEvent event { if(event.getAction()==MotionEvent.ACTION_DOWN){ view.setPressed(true); switch (view.getId()) { case R.id.bt0: break; case R.id.bt1: break; case R.id.bt2: break; ............... } } return true; } };