-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
  • 18,477
  • 11
  • 47
  • 78
  • 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
  • 739
  • 3
  • 24