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

Publicado el: 23 abril 2017
en el 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 !


En esta página del sitio puede ver el video en línea Interface world (Java + Android), Level 1: Callback method de Duración hora minuto segunda en buena calidad , que subió el usuario Low Code High Value 23 abril 2017, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 15,753 veces y le gustó 153 a los espectadores. Disfruta viendo!