Compare commits

..
7 Commits
Author SHA1 Message Date
EddyVerbruggen 440ea5bded Toast not shown in Honor 8XS #120 2018-11-10 20:40:18 +01:00
EddyVerbruggen 8869b81749 Remove show toast method call from cancel timer to ensure that toast show is called only once. #118 2018-08-22 09:37:36 +02:00
Eddy VerbruggenandGitHub e4e18f143a Merge pull request #118 from patrickfrisch/master
Remove show toast method call from cancel timer to ensure that toast show is called only once.
2018-08-22 09:35:11 +02:00
Patrick Frisch 9757e2c04c Remove show toast method call from cancel timer to ensure that toast show is called only once. 2018-08-21 16:46:09 +02:00
EddyVerbruggen 791beb0bc4 bump 2018-03-16 07:56:27 +01:00
Eddy VerbruggenandGitHub fde8da464f Merge pull request #113 from jeffborg/jeffborg-patch-missing-test-js
removed reference to removed test.js
2018-03-16 07:54:44 +01:00
Jeffrey BorgandGitHub dbf27e63a4 removed reference to removed test.js
Build fails with 2.6.1 due to missing file, removed reference to this file for cordova
2018-03-16 09:40:45 +11:00
4 changed files with 13 additions and 8 deletions
+2 -1
View File
@@ -273,7 +273,8 @@ The Android code was entirely created by me.
For iOS most credits go to this excellent [Toast for iOS project by Charles Scalesse] (https://github.com/scalessec/Toast).
## 6. CHANGELOG
- 2.6.1: [iOS view hierarchy fix.](https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin/pull/112)
- 2.7.0: [Android P compatibility.](https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin/issues/116)
- 2.6.2: [iOS view hierarchy fix.](https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin/pull/112)
- 2.6.0: Windows support!
- 2.5.2: Multi-line wrapping Toasts are now center aligned.
- 2.5.1: You can now specify the `textSize` used in the font for iOS and Android.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-x-toast",
"version": "2.6.1",
"version": "2.7.1",
"description": "This plugin allows you to show a Toast. A Toast is a little non intrusive buttonless popup which automatically disappears.",
"cordova": {
"id": "cordova-plugin-x-toast",
+1 -4
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-x-toast"
version="2.6.1">
version="2.7.1">
<name>Toast</name>
@@ -28,9 +28,6 @@
<clobbers target="window.plugins.toast" />
</js-module>
<js-module src="test/tests.js" name="tests">
</js-module>
<!-- ios -->
<platform name="ios">
+9 -2
View File
@@ -36,6 +36,7 @@ public class Toast extends CordovaPlugin {
private ViewGroup viewGroup;
private static final boolean IS_AT_LEAST_LOLLIPOP = Build.VERSION.SDK_INT >= 21;
private static final boolean IS_AT_LEAST_PIE = Build.VERSION.SDK_INT >= 28;
// note that webView.isPaused() is not Xwalk compatible, so tracking it poor-man style
private boolean isPaused;
@@ -192,7 +193,13 @@ public class Toast extends CordovaPlugin {
}
// trigger show every 2500 ms for as long as the requested duration
_timer = new CountDownTimer(hideAfterMs, 2500) {
public void onTick(long millisUntilFinished) {toast.show();}
public void onTick(long millisUntilFinished) {
// see https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin/issues/116
// and https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin/issues/120
// if (!IS_AT_LEAST_PIE) {
// toast.show();
// }
}
public void onFinish() {
returnTapEvent("hide", msg, data, callbackContext);
toast.cancel();
@@ -257,4 +264,4 @@ public class Toast extends CordovaPlugin {
public void onResume(boolean multitasking) {
this.isPaused = false;
}
}
}