Android Basics - Using Handler and Runnable to Schedule Code

preview_player
Показать описание
In this Video you will learn how to Create a Handler to Schedule Code.
Android runs every App in a separate Process for Security and Scalability.
Handlers can be used to Schedule code to run at a future time.
Рекомендации по теме
Комментарии
Автор

Great. I was looking for a much simpler example of Handler and Runnable and i believe this is what i was looking for.

rashidfaheem
Автор

how to schedule a intent to move to next activity after a time delay?

ritujpandey
Автор

So we need to create a Handler object and use Handler.PostDelayed method which will take two arguments (1- A Runnable object in which run method will have code to execute, 2- How much delay in millisecond). Now the question is how to repeat that process?

rashidfaheem
Автор

Hey Hi, actually i want to call ViewPager which is with 4 images inside a fragment. so now problem is that, i want to call that fragment by Handler handleMessage with thread. sleep method. can you help

POOJASINHA
Автор

This will execute only once...if we want repeated execution means what we should do.. please tell.

Thanks in advance

vinayTshetty
welcome to shbcf.ru