+ 1

Postdelayed in android help

Im a android newbie please forgive me. This is a stopwatch code i found on a book.what is the postdelayed() method used for?why do we want to delay it,it is a stopwatch i thought it should be running continuously without any delay? this sentence is from the book "you use it to post code that should be run in the future".what do you mean by post code? https://code.sololearn.com/cqt30h4DU1jN/?ref=app

20th Nov 2017, 8:53 AM
oyl
3 Respuestas
0
to make a stop watch you wont make it running continuosly you will let it run repeated every second so you use post delay method on your metgod lets say doSomeThing() every 1000 milli second you call it postDelay(doSomeThing(),1000); it will be repeated every second in the stop watch you will let it each second add one to your seconds counter so it will work like a real watch this is what i think :)
21st Nov 2017, 5:21 PM
Alziber Mohammed
Alziber Mohammed - avatar
0
thanks i got one more android question.could you help?it is my most recent post.
21st Nov 2017, 5:26 PM
oyl
0
ok
21st Nov 2017, 5:29 PM
Alziber Mohammed
Alziber Mohammed - avatar