Created
August 16, 2020 12:02
-
-
Save teegarcs/d34daa6b7367702c8a3f57ce5ba7011c to your computer and use it in GitHub Desktop.
This file contains 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 MessageActivity : AppCompatActivity() { | |
....... | |
/** | |
* launched via onClick in the XML | |
* sets this finishing activity's result to the text string | |
* entered by the user | |
*/ | |
fun onSubmitMessage(view: View) { | |
val result = Intent().putExtra(MessageContract.MESSAGE, | |
mBinding.messageInput.text.toString()) | |
setResult(Activity.RESULT_OK, result) | |
finish() | |
} | |
....... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment