Showing Notifications / Toasts since m5-SDK
What you learn: Showing Notifications, since m5 called 'Toasts' has changed a bit. This shows the new way of doing so.
Difficulty: 0.5 of 5

What it will look like:
Image taken on old SDK:


Description: There are two ways of showing a Toast:
Using java Syntax Highlighting
- // public static Toast makeText(Context context, CharSequence text, int duration)
- Toast.makeText(this, "Some text here...", Toast.LENGTH_SHORT).show();
- // or from a String-ID (text "behind" may also be formatted!)
- // public static Toast makeText(Context context, int resId, int duration)
- Toast.makeText(this,R.string.id_of_maybe_formatted_text, Toast.LENGTH_LONG).show();
Parsed in 0.070 seconds, using GeSHi 1.0.8.4
That's it 

Regards,
plusminus



: 

