Interface world (Java + Android), Level 1: Callback method

Publicado em: 23 Abril 2017
no canal de: Low Code High Value
15,753
153

Interface world Java + Android, Level 1: Callback method !

Callback method:
"Don't call me, I'll call you".
Main thread starts another thread to do something, when the
worker thread finishes, it calls the result back to the main thread.

Java implement:
Step 1. Create a class as a worker.
Step 2. Create a callback interface.
Step 3. Worker class do something and call result back.
Step 4. Make callback deeper.
Main thread doesn't know + doesn't care how and what thread is actually
did the work, it just handles the result, that's all.

Android implement:
Step 1. Create MainActivity + a button to show custom dialog with 3 options.
Step 2. Create a custom dialog.
Step 3. Create a callback interface.
Step 4. Integrate callback and handle result.
Step 5. Make callback deeper.
Main activity doesn't know + doesn't care how many dialogs is opened
to let user select, it just handle the final result.

Example application: https://play.google.com/store/apps/de...

Please like, share and subscribe !


Nesta página do site você pode assistir ao vídeo on-line Interface world (Java + Android), Level 1: Callback method duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Low Code High Value 23 Abril 2017, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 15,753 vezes e gostou 153 espectadores. Boa visualização!