Last active
May 4, 2017 12:52
-
-
Save smaugho/d5cd35d888bd33df57f1559a266f1869 to your computer and use it in GitHub Desktop.
Navigating in the app with Actions
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
@EActivity(R.id.activity_settings) | |
public class SettingsActivity extends Activity { | |
@Click | |
void showProfile() { | |
$ProfileFragment(); | |
} | |
@Click | |
void showNotifications() { | |
$NotificationsFragment(); | |
} | |
@Click | |
void logout() { | |
$AlertDialog().message("Are you sure you want to logout?") | |
.positiveButton("Yes") | |
.negativeButton("Cancel"); | |
//The method will continue if the user presses "Yes" | |
$MainActivity(); | |
finish(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment