postdelayed
Best practice for delaying program execution in Java (Android)
I am making a quiz app for Android. The user has 30 seconds to answer as many questions as they can. I create a small gap in execution time between questions so the user can see if they got the ques[详细]
2023-04-10 16:07 分类:问答Handler.removeCallbacks() doesn't remove callback - Why?
Given the following LogCat 开发者_Python百科trace, which shows that Handler.removeCallbacks() is called (via MyListener.cancelTimeout()) clearly before myTask.run():[详细]
2023-03-28 00:32 分类:问答How to Pull the User String into timer.postDelayed
How do I pull the user string into the Handler timer.postDelayed? public class Quotes extends Activity implements OnClickListener {[详细]
2023-03-18 22:24 分类:问答Incrementing progressbar during a delayed call
I have a delayed call which looks like this: handler.postDelayed(new Runnable() { public void run() { newDeviceBluetooth();[详细]
2023-03-14 13:50 分类:问答How to execute a function every two seconds in Java on Android?
I\'m trying to execute a chunk of Java code in my Android program every two seconds. My code currently looks like this:[详细]
2023-03-03 10:02 分类:问答Runnable is executing slower than expected
I\'m using a runnable in my Android app to update a countdown timer, as shown in the code below. It appears to work but I noticed my timer takes a few seconds longer than expected. For example, if it\[详细]
2023-02-20 11:22 分类:问答How to stop the launch of a thread done with postDelayed
I ha开发者_开发知识库ve a service tha launch a thread after 15 sec. This is a snippet of my code:[详细]
2023-02-05 16:43 分类:问答cancelling a handler.postdelayed process
I am using handler.postDelayed() to create a waiting period before the next stage of my app takes place. During the wait period I am displaying a dialog with progress bar and cancel button.[详细]
2023-01-29 12:22 分类:问答Updating UI with Runnable & postDelayed not working with timer app
I have looked at every discussion and thread I can find on getting this to work but it is not. I have a simple timer that updates a text view (mTimeTextField in the example below). The mUpdateTimeTask[详细]
2023-01-16 21:50 分类:问答How to get an Android widget's size after layout is calculated?
I have a layout which specifies sizes of widgets in relative dimension, for example: <LinearLayout ... layout_height=\"fill_parent\">[详细]
2022-12-31 08:20 分类:问答