I\'m using two button in view. While clicking two button simultaneously it will goes to different activity at a time. How to avoid this?
I have tried like this, But
A "Better" Practice is to use the onClickListener like this ->
OnClickListener switchableListener = new OnClickListener(@Override
public void onClick(View arg0) {
arg0.setOnClickListener(null);
(or) use the view directly as a final variable in case of errors
ex :
textView.setOnClickListener(null);
// Some processing done here
Completed , enable the onclicklistener arg0.setOnClickListener(switchableListener);
});
This should fix the problem and its quite a simple way of handling things