Back to project page android-openmap-framework.
The source code is released under:
Apache License
If you think the Android project android-openmap-framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jwetherell.openmap.data; //w ww.j ava 2 s . c o m import android.content.Context; import android.view.Gravity; import android.widget.Toast; /** * This abstract class has many static methods to display message to the user. * * @author Justin Wetherell <phishman3579@gmail.com> */ public abstract class MessageUtilities { /** * Alert the user using the Toast mechanism. * * @param context * Context of the message. * @param msg * String to display. * @throws NullPointerException * if context or msg are NULL. */ public static void alertUser(Context context, String msg) { if (context == null || msg == null) throw new NullPointerException(); Toast t = Toast.makeText(context, msg, Toast.LENGTH_SHORT); t.setGravity(Gravity.CENTER, 0, 0); t.show(); } }