Explained - HandlerThread

Опубликовано: 11 Август 2017
на канале: Codetutor
10,012
102

We have already seen how to implement a Looper using a normal thread in previous video. In this video I show you how to user HandlerThread class from Android to create a Looper. The advantage of using HandlerThread is you don’t have to worry about executing the Looper.prepare() and Looper.loop() to make a Thread behave as Looper. HandlerThread does it for you. That’s why you don’t have to override run() methods as well. Here in this case we just override onLooperPrepared - which you can guess get’s executed when Looper gets prepared by HandlerThread. We can practically swap LooperThread (a Thread implementation as a Looper) with a Android’s HandlerThread. We discuss this in detailed manner through a demonstrable code in this video

Follow me on Twitter:   / anilvdeshpande  

Source code on Github: https://github.com/AnilDeshpande/UITh...


На этой странице сайта вы можете посмотреть видео онлайн Explained - HandlerThread длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Codetutor 11 Август 2017, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 10,012 раз и оно понравилось 102 зрителям. Приятного просмотра!