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?
Asked
Active
Viewed 26 times
-1

ADM
- 20,406
- 11
- 52
- 83

Md Abdul Shahed
- 49
- 3
-
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 Answers
2
To manually do change the visibility use:
yourbutton.setVisibility(View.INVISIBLE);
or
yourbutton.setVisibility(View.VISIBLE);

Thomas Morris
- 794
- 5
- 26