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