MCPcopy Create free account
hub / github.com/FongMi/CatVodSpider / Notify

Class Notify

app/src/main/java/com/github/catvod/utils/Notify.java:8–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import com.github.catvod.spider.Init;
7
8public class Notify {
9
10 private Toast mToast;
11
12 private static class Loader {
13 static volatile Notify INSTANCE = new Notify();
14 }
15
16 private static Notify get() {
17 return Loader.INSTANCE;
18 }
19
20 public static void show(String text) {
21 Init.post(new Runnable() {
22 @Override
23 public void run() {
24 get().makeText(text);
25 }
26 });
27 }
28
29 private void makeText(String message) {
30 if (TextUtils.isEmpty(message)) return;
31 if (mToast != null) mToast.cancel();
32 mToast = Toast.makeText(Init.context(), message, Toast.LENGTH_LONG);
33 mToast.show();
34 }
35}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected