postdelayed Questions

7

final Handler handler = new Handler(); LOG.d("delay"); handler.postDelayed(new Runnable() { @Override public void run() { LOG.d("notify!"); //calling some methods here } }, 2000); The "delay"...

6

Solved

I call multiple Handlers by new Handler().postDelayed(new Runnable()..... How can I stop it when I click on back? public class MyActivity extends AppCompatActivity implements OnClickListener { ...
Dyann asked 28/3, 2014 at 17:0

5

Solved

I have a countDownTimer and if the user does not hit the gameButton within the 12th second I want the gameOver method called. The problem is that either the game function instantly gets called when...
Chinaman asked 21/2, 2017 at 22:36

5

How can I loop that time() function on the onCreate every 5 seconds.. help me I'm a newbie in Android =) ... I want to execute time() function in onCreate every 5 seconds. public void onCreate(Bu...
Bill asked 19/1, 2016 at 15:15

3

Solved

I'm using postDelayed method of the Handler in order to perform an action after certain amount of time: private static int time_to_wait = 2000; Handler handler = new Handler(); handler.postDelaye...
Inconsecutive asked 3/4, 2014 at 13:37

2

I would like to know if it's possible to use handler().postdelayed twice? I mean, I want to create a button, that when clicked it change the color and stay in this state 1 second, then, after 1 se...
Daybook asked 17/8, 2013 at 2:29

5

Solved

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. My pro...
Cochrane asked 7/12, 2010 at 15:45

6

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 mUpdateTimeT...
Rumpus asked 21/9, 2010 at 23:14

8

Solved

I have a situation in an Android app where I want to start a network activity (sending out some data) which should run every second. I achieve this as follows: In the onCreate() I have the code: ...
Currier asked 1/6, 2012 at 6:2

3

I'm newbie on Android and get stuck on testing a SplashScreen, basically what I'm doing is trying to test that the splash screen stays on for 3s. this is the code for the splashScreen @Override pr...
Aloisia asked 8/7, 2014 at 21:42

4

Solved

I have an "open" animation and am using Handler.postDelayed(Runnable, delay) to trigger a "close" animation after a short delay. However, during the time between open and close, there is possibly a...
Irregular asked 2/9, 2010 at 12:48

2

Solved

I am building an android board game which features AI. The AI gets a turn and has to invoke a series of actions after which it posts invalidate to my custom view to update. I need to slow down th...
Quirk asked 24/1, 2013 at 21:3

2

in my app I got a thrad that checks every 60s data from a webservice (defined in onCreate()): new Thread(new Runnable() { @Override public void run() { while (true) { try { Thread.sleep(PER...

3

Solved

I used postedDelayed method to refresh my Activity, which works fine. But the problem is that even when I press the Back button postdelayed method call back the previous activity.. //handler for 3...
Championship asked 17/4, 2013 at 3:13

2

Solved

In the onHandleIntent of my my IntentService class, I created handle containing a runnable which should be done after 20 seconds. Unfortunatly my service sleeps or is destroyed before this period. ...
Peptidase asked 28/1, 2014 at 13:40

2

Solved

I'm very new to android programming so please forgive my noobie-ness. I'm trying to create a very simple activity that will have one TextView in the middle of the Layout and just have it switch to ...
Stefaniastefanie asked 15/8, 2013 at 6:9

1

Solved

I'm using SignalR 2.0.0-beta2 and it's behaving strangely in production environment where an ASP.NET MVC 5 [ .NET Framework 4.5 ] app is installed on Windows Server 2008 with IIS 7. The AppPool is ...
Belindabelisarius asked 21/7, 2013 at 3:43

3

I used postedDelayed method to refresh my Activity, which works fine. But the problem is that even when I press the Back button postdelayed method call back the previous activity.. //handler...
Allheal asked 18/4, 2013 at 3:27

2

Solved

I have a layout which specifies sizes of widgets in relative dimension, for example: <LinearLayout ... layout_height="fill_parent"> <ImageView ... layout_height="wrap_content" /> &lt...

1

Solved

I am trying to get the bounds of my mapview but I had the problem that the latitude is always set to 0 and longtitude is always set to 360*1E6. According to this link, that is because it will only ...
Clutch asked 22/11, 2010 at 14:29
1

© 2022 - 2025 — McMap. All rights reserved.