mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2025-04-27 05:10:15 +08:00
#35 Close toast when app is suspended or closed: lastly, added WP8
This commit is contained in:
parent
9c269fc9ba
commit
d175358f36
@ -2,7 +2,7 @@
|
|||||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
id="nl.x-services.plugins.toast"
|
id="nl.x-services.plugins.toast"
|
||||||
version="2.0.6-dev">
|
version="2.0.6">
|
||||||
|
|
||||||
<name>Toast</name>
|
<name>Toast</name>
|
||||||
|
|
||||||
|
@ -90,10 +90,7 @@ namespace WPCordovaClassLib.Cordova.Commands
|
|||||||
pgrid.Width = Application.Current.Host.Content.ActualWidth - 80;
|
pgrid.Width = Application.Current.Host.Content.ActualWidth - 80;
|
||||||
|
|
||||||
b.Child = pgrid;
|
b.Child = pgrid;
|
||||||
if (popup != null && popup.IsOpen)
|
this.hide(null);
|
||||||
{
|
|
||||||
popup.IsOpen = false;
|
|
||||||
}
|
|
||||||
popup = new Popup();
|
popup = new Popup();
|
||||||
popup.Child = b;
|
popup.Child = b;
|
||||||
|
|
||||||
@ -145,6 +142,14 @@ namespace WPCordovaClassLib.Cordova.Commands
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void hide(string options)
|
||||||
|
{
|
||||||
|
if (popup != null && popup.IsOpen)
|
||||||
|
{
|
||||||
|
popup.IsOpen = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async void hidePopup(int delay)
|
private async void hidePopup(int delay)
|
||||||
{
|
{
|
||||||
await Task.Delay(delay);
|
await Task.Delay(delay);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user