Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.