Android Open Source - Pyazing Toasts






From Project

Back to project page Pyazing.

License

The source code is released under:

Apache License

If you think the Android project Pyazing 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 net.ichigotake.pyazing;
/*ww  w .j  a va 2  s  .c  o m*/
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.widget.Toast;

final class Toasts {

    private Toasts() {}

    static void ignoreFile(Context context) {
        show(context, context.getString(R.string.app_upload_ignore_file));
    }

    static void startUploading(Context context) {
        show(context, context.getString(R.string.app_upload_progress_start));
    }

    static void completeUploading(Context context) {
        show(context, context.getString(R.string.app_upload_complete));
    }

    static void completeCopingText(Context context, String text) {
        show(context, context.getString(R.string.app_copy_to_clipboard_complete, text));
    }

    private static void show(final Context context, final String message) {
        Handler mainThread = new Handler(Looper.getMainLooper());
        mainThread.post(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
            }
        });
    }
}




Java Source Code List

net.ichigotake.pyazing.ApplicationTest.java
net.ichigotake.pyazing.CopyToClipboardService.java
net.ichigotake.pyazing.PazingApplication.java
net.ichigotake.pyazing.Toasts.java
net.ichigotake.pyazing.UploadMediaActivity.java
net.ichigotake.pyazing.UploadMediaService.java
net.ichigotake.pyazing.UploadMedia.java
net.ichigotake.pyazing.UploadMode.java
net.ichigotake.pyazing.UploadingNotification.java
net.ichigotake.pyazing.WelcomeActivity.java