Prevent buttons to be tapped

Is there any way to prevent buttons or other elements to be tapped while a message is being shown and after a short time make them work normally?

Thanks
Danilo

You can prevent buttons from being tapped using the Throttle or Debounce functions from the marketplace. If you want to show a message however, I think you might need to add a bit more logic and use a boolean variable with a delay function, something like:

  • Place an if condition after component tap event to check the variable’s value.
  • If variable is true, set the variable to false, place a delay timer or your other logic (or both), then set the variable to true at the end.
  • If variable is false, place an alert or toast to display a message.

If the user taps when the variable is set to true, the button’s logic runs as usual. If the user taps while the variable is set to false, they will see a message instead.