Skip to content

Instantly share code, notes, and snippets.

@smaugho
Last active May 3, 2017 14:34
Show Gist options
  • Save smaugho/e82539f9c572c9d6b855536e7af7c127 to your computer and use it in GitHub Desktop.
Save smaugho/e82539f9c572c9d6b855536e7af7c127 to your computer and use it in GitHub Desktop.
Callback variables in Action Selectors
String[] types= {"Select Date", "Select Time"}
$AlertDialog().items(types);
if ($AlertDialog.ItemSelected) {
int $position = 0;
if ($position == 0 ) {
$DateDialog();
int $year = 0, $month = 0, $day = 0;
//do something with the variables $year, $month, $day
} else {
$TimeDialog();
$Toast("Selected time is: {hour}:{minute}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment