Skip to content

Instantly share code, notes, and snippets.

@wajahatkarim3
Last active May 1, 2020 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wajahatkarim3/4b7f0e79411d384d3d2f6b3c07d42158 to your computer and use it in GitHub Desktop.
Save wajahatkarim3/4b7f0e79411d384d3d2f6b3c07d42158 to your computer and use it in GitHub Desktop.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
// Other Methods
private val simpleContractRegistration = registerForActivityResult(SimpleContract()) {resultStr ->
if (resultStr == null)
Toast.makeText(this, "Nothing selected / User Cancelled", Toast.LENGTH_SHORT).show()
else
Toast.makeText(this, "Selected value is $resultStr", Toast.LENGTH_SHORT).show()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment