Android Open Source - android-openmap-framework Message Utilities






From Project

Back to project page android-openmap-framework.

License

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.

Java Source Code

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();
    }
}




Java Source Code List

com.jwetherell.openmap.activity.CenteredMapActivity.java
com.jwetherell.openmap.activity.CustomMapActivity.java
com.jwetherell.openmap.activity.OpenMapDemo.java
com.jwetherell.openmap.activity.configure.ConfigureUser.java
com.jwetherell.openmap.common.Ellipsoid.java
com.jwetherell.openmap.common.GreatCircle.java
com.jwetherell.openmap.common.LatLonPoint.java
com.jwetherell.openmap.common.Length.java
com.jwetherell.openmap.common.MGRSPoint.java
com.jwetherell.openmap.common.MoreMath.java
com.jwetherell.openmap.common.Planet.java
com.jwetherell.openmap.common.ProjMath.java
com.jwetherell.openmap.common.UTMPoint.java
com.jwetherell.openmap.common.ZonedUTMPoint.java
com.jwetherell.openmap.data.MessageUtilities.java
com.jwetherell.openmap.data.UserData.java
com.jwetherell.openmap.overlay.HashMapItemizedOverlay.java
com.jwetherell.openmap.utilities.Utilities.java