How to make a button invisible after 3 seconds?
1 answer
You can use the View.postDelayed(...) method:
mButton.postDelayed(new Runnable() { @Override public void run() { mButton.setVisibility(View.INVISIBLE); } }, 3000); The first parameter is the class that implements the Runnable interface, the second is the delay in milliseconds.
- Exactly what is needed. Thank. - Collective Farmer
|