Last active
April 26, 2017 23:09
-
-
Save smaugho/6a320b9d7020cd7177389baf29d5ca6f to your computer and use it in GitHub Desktop.
AddressFragment Example
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
@EFragment(R.id.fragment_address) | |
public class AddressFragment extends Fragment { | |
@FragmentArg | |
@Model | |
@Populate | |
@Recollect(validate = true) | |
User user; | |
@Click | |
void save() { | |
$AlertDialog() | |
.message("Are you sure you want to save this user?") | |
.positiveButton("Yes").negativeButton("No"); | |
$PutModel(user); | |
if ($PutModel.Failed) { | |
$Toast("User {user.fullName()} couldn't be saved"); | |
} | |
$Toast("User {user.fullName()} has been saved"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment