From 64b54be7da7435115f3fdc423673bf8a5463e7a8 Mon Sep 17 00:00:00 2001 From: iddoeldor Date: Wed, 20 May 2020 17:14:51 +0300 Subject: [PATCH] update android toast; issue #13 --- README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 180cdf4..6cde5cf 100644 --- a/README.md +++ b/README.md @@ -1010,14 +1010,10 @@ TODO #### Android make Toast ```js -Java.scheduleOnMainThread(function() { - Java.use("android.widget.Toast") - .makeText( - Java.use("android.app.ActivityThread").currentApplication().getApplicationContext(), - "Text to Toast here", - 0 // https://developer.android.com/reference/android/widget/Toast#LENGTH_LONG - ) - .show(); +// 0 = // https://developer.android.com/reference/android/widget/Toast#LENGTH_LONG +Java.scheduleOnMainThread(() => { + Java.use("android.widget.Toast") + .makeText(Java.use("android.app.ActivityThread").currentApplication().getApplicationContext(), Java.Use("java.lang.StringBuilder").$new("Text to Toast here"), 0).show(); }); ```