-
Notifications
You must be signed in to change notification settings - Fork 0
Helper Classes
-
Example to show toast for
Toast.LENGTH_SHORT
period of time upon the first back button press, with a message reading "Press back button to confirm".FirstBackPressAction firstBackPressAction = new ToastDisplay() .standard(this); //required DoubleBackPress doubleBackPress = new DoubleBackPress() .withFirstBackPressAction(firstBackPressAction) ...
Example to show toast for
Toast.LENGTH_SHORT
period of time upon the first back button press, with a message reading "Press back button to Exit".FirstBackPressAction firstBackPressAction = new ToastDisplay() .standard(this, "Press back button to Exit"); //required DoubleBackPress doubleBackPress = new DoubleBackPress() .withFirstBackPressAction(firstBackPressAction) ...
-
SnackbarDisplay
: standard SnackbarNote : Since Snackbar require the callers's parent view, the SnackbarDisplay class needs to be set and provided to the DoubleBackPress object after the View is set. Example, in an Activity, this would be inside the onCreate() function, after the setContentView() function is called.
Example to show snackbar for
Snackbar.LENGTH_SHORT
period of time upon the first back button press, with a message reading "Press back button to confirm".//after the view is initialized FirstBackPressAction firstBackPressAction = new Snackbar() .standard(parentView); //required doubleBackPress.setFirstBackPressAction(firstBackPressAction)
Example to show snackbar for
Snackbar.LENGTH_SHORT
period of time upon the first back button press, with a message reading "Press back button to Exit".//after the view is initialized FirstBackPressAction firstBackPressAction = new Snackbar() .standard(parentView, "Press back button to Exit"); //required doubleBackPress.setFirstBackPressAction(firstBackPressAction)
API Index
-
- Constructor
- Methods
- Behaviour modifiers
-
- constructor
-
- constructor