Delete an event scheduled on android

1

Good afternoon, I'm programming a spinner that comes with a flag that I have. if the user makes a gesture or a click on the screen, I get a progressDialog .

My question is how do I cancel the second click so that I do not do the event to which I gave click and deal with the

getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
            WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);

but with this the second click showing the progressdialiog would no longer work.

I am trying to know how to eliminate the stack of events that are scheduled in case the second action is activated. To capture the event I am using dispatchTouchEvent thank you very much

    
asked by diego alejandro franco osorio 29.04.2016 в 19:25
source

1 answer

-1

I do not understand the question too much, but if the idea is to activate or deactivate the functionality of the button you can perform an instance of the spinner with java by means of a spinner cast of the findviesbyid method and enter the id of R.id. "the name of the component "by parameter. Then, the spinner object has the method addOnClickListener to add events, which receives an interface per parameter, which if it is null, will not cause it to do nothing. If you need to do nothing only when it has already been clicked, you can add and elminate the event on click with the focus listener. Good luck!

    
answered by 09.07.2016 / 00:30
source