Compare commits

..
2 Commits
4 changed files with 8 additions and 6 deletions
+1
View File
@@ -273,6 +273,7 @@ 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.7.2: Even better Android compatibility, but you're limited to short and long durations now, on Android.
- 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!
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-x-toast",
"version": "2.7.0",
"version": "2.7.2",
"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 -1
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.7.0">
version="2.7.2">
<name>Toast</name>
+5 -4
View File
@@ -90,7 +90,7 @@ public class Toast extends CordovaPlugin {
final android.widget.Toast toast = android.widget.Toast.makeText(
IS_AT_LEAST_LOLLIPOP ? cordova.getActivity().getWindow().getContext() : cordova.getActivity().getApplicationContext(),
message,
android.widget.Toast.LENGTH_LONG // actually controlled by a timer further down
"short".equalsIgnoreCase(duration) ? android.widget.Toast.LENGTH_SHORT : android.widget.Toast.LENGTH_LONG
);
if ("top".equals(position)) {
@@ -195,9 +195,10 @@ public class Toast extends CordovaPlugin {
_timer = new CountDownTimer(hideAfterMs, 2500) {
public void onTick(long millisUntilFinished) {
// see https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin/issues/116
if (!IS_AT_LEAST_PIE) {
toast.show();
}
// 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);