List of utility methods to do Toast Create
void | showToask(Context context, String tip) show Toask Toast.makeText(context, tip, Toast.LENGTH_SHORT).show(); |
void | showToast(Context context, String msg) show Toast Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); |
void | toast(Context context, String text) toast Toast.makeText(context, text, Toast.LENGTH_SHORT).show(); |
void | toast(Context c, String msg) toast Toast.makeText(c, msg, Toast.LENGTH_SHORT).show(); |
void | showToastShort(Activity ctx, String text) show Toast Short Toast.makeText(ctx, text, Toast.LENGTH_SHORT).show(); |
void | showToastLong(Activity ctx, String text) show Toast Long Toast.makeText(ctx, text, Toast.LENGTH_LONG).show(); |
void | showMessage(Context ctx, String msg) show Message Toast toast = Toast.makeText(ctx, msg, Toast.LENGTH_SHORT); toast.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 580); toast.show(); |
void | showMessage(final Activity context, final String message) show Message context.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(context, message, Toast.LENGTH_LONG).show(); }); |
void | showFailure(Activity activity, int id) show Failure Toast.makeText(activity, activity.getResources().getString(id), Toast.LENGTH_LONG).show(); |
void | showElapsed(long start, long end, Context ctx) show Elapsed Log.i("ElapsedTimeUtil", "Request took " + getElapsedSeconds(start, end) + " seconds to execute"); |