mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2026-07-31 00:02:14 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3235b9c8e3 | ||
|
|
ed2398455a | ||
|
|
2a0ecbc2dd | ||
|
|
6351512cf1 | ||
|
|
206b7e014e | ||
|
|
a429424107 | ||
|
|
4324168d2a | ||
|
|
75287f6517 | ||
|
|
04b4cf7894 |
@@ -0,0 +1,4 @@
|
||||
.idea/
|
||||
screenshots/
|
||||
test/
|
||||
issue_template.md
|
||||
@@ -32,18 +32,15 @@ This plugin allows you to show a native Toast (a little text popup) on iOS, Andr
|
||||
It's great for showing a non intrusive native notification which is guaranteed always in the viewport of the browser.
|
||||
* You can choose where to show the Toast: at the top, center or bottom of the screen.
|
||||
* You can choose two durations: short (approx. 2 seconds), or long (approx. 5 seconds), after which the Toast automatically disappears.
|
||||
* Compatible with [Cordova Plugman](https://github.com/apache/cordova-plugman).
|
||||
* Officially supported by [PhoneGap Build](https://build.phonegap.com/plugins).
|
||||
* Minimum iOS version is [6](https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin/issues/7).
|
||||
|
||||
Example usages:
|
||||
* "There were validation errors"
|
||||
* "Account created successfully"
|
||||
* "The record was deleted"
|
||||
* "Login successful"
|
||||
* "The battery is almost dead"
|
||||
* "You are now logged out"
|
||||
* "Connection failure, please try again later"
|
||||
* "Created Order #00287
|
||||
|
||||
## 2. Screenshots
|
||||
|
||||
@@ -276,6 +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.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.
|
||||
- 2.5.0: By popular demand: Specify the duration of the Toast on iOS and Android. Pass in `short` (2000ms), `long` (4000ms), or any nr of milliseconds: `900`.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-plugin-x-toast",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.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",
|
||||
|
||||
+3
-4
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="cordova-plugin-x-toast"
|
||||
version="2.6.0">
|
||||
version="2.6.1">
|
||||
|
||||
<name>Toast</name>
|
||||
|
||||
@@ -80,7 +79,7 @@
|
||||
<feature name="Toast" value="Toast" />
|
||||
</config-file>
|
||||
</platform>
|
||||
|
||||
|
||||
<!-- windows -->
|
||||
<platform name="windows">
|
||||
<js-module src="src/windows/toastProxy.js" name="ToastProxy">
|
||||
@@ -90,5 +89,5 @@
|
||||
<feature name="Toast" value="Toast" />
|
||||
</config-file>
|
||||
</platform>
|
||||
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -157,7 +157,7 @@ static id styling;
|
||||
}
|
||||
|
||||
- (UIViewController*) getTopMostViewController {
|
||||
UIViewController *presentingViewController = [[[UIApplication sharedApplication] delegate] window].rootViewController;
|
||||
UIViewController *presentingViewController = [[UIApplication sharedApplication] keyWindow].rootViewController;
|
||||
while (presentingViewController.presentedViewController != nil) {
|
||||
presentingViewController = presentingViewController.presentedViewController;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user