Load multi-page apps in same webview and update pause/resume for consistency.

1. Make handling of multi-page apps consistent with iOS and Blackberry to load into same webview (instead of starting a new activity).

2. Make lifecycle consistent.  pause is called when going into background, resume is called when coming into foreground.  It is no longer called when loading or leaving an HTML page.  Use window.onload/onunload to get these notifications.
This commit is contained in:
Bryce Curtis
2011-10-21 16:29:55 -05:00
parent 75f3651376
commit bd7ed19b52
6 changed files with 188 additions and 147 deletions
@@ -51,6 +51,17 @@ public final class PluginManager {
this.loadPlugins();
}
/**
* Re-init when loading a new HTML page into webview.
*/
public void reinit() {
// Stop plugins on current HTML page and discard
this.onPause(false);
this.onDestroy();
this.plugins = new HashMap<String, IPlugin>();
}
/**
* Load plugins from res/xml/plugins.xml
*/