0
My question is the following, I have an Activity that finalizes an order and inserts the data of that request in the database and it takes a little time.... I wonder if there is any way to lock the touch to prevent the user to press some button, textEdit, spinner, listview and related that I have on the screen... I tried to set item by item, but the spinner and listview cannot lock. I wanted to disable the full touch of the screen during data transmission and only enable again when the transaction is over... Someone has an idea of a way to do this?
You can create a
thread
for insertion while rotating adialog
wait. Then you return toHandler
and closes thedialog
@Marcio– Gabriel
can disable touch in dialog? if you have the idea is genius
– Marcio Vieira
pq I have a dialog on another screen q if you click qlq place it closes
– Marcio Vieira
Yes, you have the option
dialog.setCanceledOnTouchOutside(false)
– Gabriel
For the dialog not to close, use setCancelable(false). But remember that when you finish, you have to give the Ismiss() of the Dialog.
– Grupo CDS Informática
I will test here and I return with the result.... Thanks for the idea =D
– Marcio Vieira
It worked perfectly..... If you had put as an answer I would evaluate you.... But thanks anyway... Thank you!!!!!
– Marcio Vieira
Just a warning in terms of UX: it’s a bad approach to stop the user from continuing to use the app because you’re making calls in the background. = D
– itscorey