I am trying to set up a situation where I am waiting for a small period of time say 3 seconds and move on. But if the user clicks my on-screen button then move on as I would
Try the following,
button = (Button) findViewById(R.id.buttonView);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Runnable clickButton = new Runnable() {
@Override
public void run() {
// whatever you would like to implement when or after clicking button
}
};
button.postDelayed(clickButton, 3000); //Delay for 3 seconds to show the result
}