-1

I have used Handler #postDelayed method, but it this makes button invisible after specified time irrespective of user interacting with button or not. How do I fix this?

ADM
  • 20,406
  • 11
  • 52
  • 83
  • you can use this link when user not interact https://stackoverflow.com/questions/4208730/how-to-detect-user-inactivity-in-android – Abdur Rehman Aug 27 '20 at 07:19

1 Answers1

2

To manually do change the visibility use:

yourbutton.setVisibility(View.INVISIBLE);

or

yourbutton.setVisibility(View.VISIBLE);

Thomas Morris
  • 794
  • 5
  • 26