Delaytime seems to overtake?


why will my app not set choice false before after delaytime??

I think your delay function will freeze the entire UI. In Android there is no such thing as a delay that stops the processor like in Arduino. Android is not an arduino with simple code, it has to do other things and you can't stop the processor because by doing so you stop the whole android and the UI. If you need to delay something, use a Clock.timer event.

delaytime is calling a clock procedure, it works ok,
but i can not understand why it not set choise false before delay

I don't see your procedure so I can't answer that. So I assume that your procedure suspends the UI as I wrote above.

It's best to share your aia project, or build a simple example project that presents the same problem.

Taifun


here is my testprogram, I vant choise visible to false before calling delaytime

Your while.test loop hangs the UI. The interface will only be updated when the loop ends. Read what Taifun has shared to learn how to use asynchronous delays in Android.

1 Like