Last active
February 5, 2020 10:11
-
-
Save surajsau/7904bc1c052576dd8ba7f96bf537bfc1 to your computer and use it in GitHub Desktop.
Flow 1: Partial flow in MCQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A: AppCompatActivity() { | |
.. | |
fun startB() { | |
.. | |
startActivityForResult(intent, REQ_CODE) | |
} | |
override onActivityResult(intent, reqCode, ..) { | |
if(reqCode == REQ_CODE) { | |
when(intent.getString("source")) { | |
"B" -> btn.text = "Continute" | |
.. | |
} | |
} | |
} | |
} | |
class B: AppCompatActivity() { | |
.. | |
fun clickBack() { | |
.. | |
intent.put("source", "B") | |
setResult(RESULT_OK, intent) | |
finish() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment