Last active
May 3, 2017 13:42
-
-
Save smaugho/67aa9858f90e499c7893b747d9cda061 to your computer and use it in GitHub Desktop.
Actions handling Future Results
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
@Click | |
void sendInformation() { | |
int informationType = getInformationType(); | |
$Toast("The information type index is {informationType}"); | |
} | |
int getInformationType() { | |
String[] types= {"Type 1", "Type 2", "Type 3"} | |
$AlertDialog().items(types).negativeButton("Cancel"); | |
if ($AlertDialog.ItemSelected) { | |
int $position = 0; | |
return position; | |
} | |
return $Future.Int; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment