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 !
Auf dieser Seite können Sie das Online-Video Interface world (Java + Android), Level 1: Callback method mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Low Code High Value 23 April 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 15,753 Mal angesehen und es wurde von 153 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!