-
Notifications
You must be signed in to change notification settings - Fork 666
Usage
Marius Volkhart edited this page May 27, 2014
·
5 revisions
The API is kept as simple as the Toast API:
Create a Crouton for any CharSequence:
Crouton.makeText(Activity, CharSequence, Style).show();
Create a Crouton with a String from your application's resources:
Crouton.makeText(Activity, int, Style).show();
Further you can attach a Crouton to any view like this:
Crouton.makeText(Activity, int, Style, int).show();
If you would like a more graphical introduction to Crouton check out this presentation.
##Important!
In your Activity.onDestroy() make sure to call
Crouton.cancelAllCroutons();
to cancel all scheduled Croutons.
This is a workaround and further description is available in #24.