Back to project page FeedListViewDemo.
The source code is released under:
MIT License
If you think the Android project FeedListViewDemo 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 io.bxbxbai.androiddemos.utils; //from ww w . j a va 2 s . com import android.content.Context; import android.widget.Toast; import io.bxbxbai.androiddemos.AppController; /** * Created by baia on 14-9-21. */ public class ToastUtils { private ToastUtils() { } private static void show(Context context, int resId, int duration) { Toast.makeText(context, resId, duration).show(); } private static void show(Context context, String message, int duration) { Toast.makeText(context, message, duration).show(); } public static void showShort(int resId) { Toast.makeText(AppController.getInstance(), resId, Toast.LENGTH_SHORT).show(); } public static void showShort(String message) { Toast.makeText(AppController.getInstance(), message, Toast.LENGTH_SHORT).show(); } public static void showLong(int resId) { Toast.makeText(AppController.getInstance(), resId, Toast.LENGTH_LONG).show(); } public static void showLong(String message) { Toast.makeText(AppController.getInstance(), message, Toast.LENGTH_LONG).show(); } }