Today, if you want to temporarily disable the buttons, you can press them only when certain conditions are met. At first, I thought it was setClickable.
Please refer to the manual:
Copy codeThe Code is as follows: public void setClickable (boolean clickable)
Since: API Level 14
Sets whether this node is clickable.
Note: Cannot be called from an AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.
Parameters
Clickable True if the node is clickable.
Throws
IllegalStateException If called from an AccessibilityService.
Public void setContentDescription (CharSequence contentDescr
This function means to press the button. For example, if you want to set a timer and simulate it on your phone, you can use this function to press the button instead of manually.Copy codeThe Code is as follows: public void setEnabled (boolean enabled)
Since: API Level 14
Sets whether this node is enabled.
Note: Cannot be called from an AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.
Parameters
Enabled True if the node is enabled.
Throws
IllegalStateException If called from an AccessibilityService.
This function is true, so that a button can be pressed or not pressed by the user. If it is set to false, the button turns gray and does not respond when it is pressed. If it is set to true, it will be used normally. This is the function I am looking.