How can i do this ?
I tryed with some thread but nothing happened.
myView.setOnTouchListener(new OnTouchListener()
{
public boolean onTouch(View arg0, MotionEvent arg1)
{
myButton.setClickable(false);
//Here i want to wait 1 second then:
myButton.setClickable(true);
return false;
}
});
Can anybody implement the one second waiting inside my code please ?
if you would wait there you will block the UI thread. Your users will hate you for that. If you describe more in detail what you want to accomplish we might be able to help you with a better solution.
A better solution is to use the postDelayed method