update android toast; issue #13
This commit is contained in:
parent
88d288a327
commit
64b54be7da
12
README.md
12
README.md
@ -1010,14 +1010,10 @@ TODO
|
|||||||
#### Android make Toast
|
#### Android make Toast
|
||||||
|
|
||||||
```js
|
```js
|
||||||
Java.scheduleOnMainThread(function() {
|
// 0 = // https://developer.android.com/reference/android/widget/Toast#LENGTH_LONG
|
||||||
Java.use("android.widget.Toast")
|
Java.scheduleOnMainThread(() => {
|
||||||
.makeText(
|
Java.use("android.widget.Toast")
|
||||||
Java.use("android.app.ActivityThread").currentApplication().getApplicationContext(),
|
.makeText(Java.use("android.app.ActivityThread").currentApplication().getApplicationContext(), Java.Use("java.lang.StringBuilder").$new("Text to Toast here"), 0).show();
|
||||||
"Text to Toast here",
|
|
||||||
0 // https://developer.android.com/reference/android/widget/Toast#LENGTH_LONG
|
|
||||||
)
|
|
||||||
.show();
|
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user