Back to project page crabox.
The source code is released under:
Apache License
If you think the Android project crabox 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.costular.crabox.android; /*from w w w. j a va 2 s . c o m*/ import android.content.Context; import android.os.Handler; import android.widget.Toast; import com.costular.crabox.util.NotificationRequest; public class Notification implements NotificationRequest{ Handler uiThread; Context appContext; public Notification(Context appContext) { this.appContext = appContext; uiThread = new Handler(); } @Override public void showShortToast(final String message) { uiThread.post(new Runnable() { public void run() { Toast.makeText(appContext, message, Toast.LENGTH_SHORT) .show(); } }); } @Override public void showLongToast(final String message) { uiThread.post(new Runnable() { public void run() { Toast.makeText(appContext, message, Toast.LENGTH_LONG) .show(); } }); } }