mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-23 01:06:23 +08:00
One last fix for a merge problem
This commit is contained in:
parent
c9a579af8c
commit
fb2b8345d1
@ -203,20 +203,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
|
|
||||||
|
|
||||||
// Intercept calls to document.addEventListener and watch for deviceready
|
// Intercept calls to document.addEventListener and watch for deviceready
|
||||||
PhoneGap._document_addEventListener = document.addEventListener;
|
PhoneGap.m_document_addEventListener = document.addEventListener;
|
||||||
|
|
||||||
document.addEventListener = function(evt, handler, capture) {
|
document.addEventListener = function(evt, handler, capture) {
|
||||||
if (evt.toLowerCase() == 'deviceready') {
|
var e = evt.toLowerCase();
|
||||||
|
if (e == 'deviceready') {
|
||||||
PhoneGap.onDeviceReady.subscribeOnce(handler);
|
PhoneGap.onDeviceReady.subscribeOnce(handler);
|
||||||
}
|
} else if (e == 'resume') {
|
||||||
else if (evt.toLowerCase() == 'onresume') {
|
|
||||||
PhoneGap.onResume.subscribe(handler);
|
PhoneGap.onResume.subscribe(handler);
|
||||||
}
|
} else if (e == 'pause') {
|
||||||
else if (evt.toLowerCase() == 'onpause') {
|
|
||||||
PhoneGap.onPause.subscribe(handler);
|
PhoneGap.onPause.subscribe(handler);
|
||||||
}
|
} else {
|
||||||
else {
|
PhoneGap.m_document_addEventListener.call(document, evt, handler);
|
||||||
PhoneGap._document_addEventListener.call(document, evt, handler);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,6 +102,7 @@ public class DroidGap extends Activity {
|
|||||||
root.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
|
root.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
|
||||||
ViewGroup.LayoutParams.FILL_PARENT, 0.0F));
|
ViewGroup.LayoutParams.FILL_PARENT, 0.0F));
|
||||||
|
|
||||||
|
/*
|
||||||
splashScreen = new ImageView(this);
|
splashScreen = new ImageView(this);
|
||||||
splashScreen.setLayoutParams(new LinearLayout.LayoutParams(
|
splashScreen.setLayoutParams(new LinearLayout.LayoutParams(
|
||||||
ViewGroup.LayoutParams.FILL_PARENT,
|
ViewGroup.LayoutParams.FILL_PARENT,
|
||||||
@ -109,8 +110,9 @@ public class DroidGap extends Activity {
|
|||||||
1.0F));
|
1.0F));
|
||||||
splashScreen.setImageResource(R.drawable.splash);
|
splashScreen.setImageResource(R.drawable.splash);
|
||||||
|
|
||||||
// root.addView(splashScreen);
|
root.addView(splashScreen);
|
||||||
|
*/
|
||||||
|
|
||||||
initWebView();
|
initWebView();
|
||||||
|
|
||||||
root.addView(appView);
|
root.addView(appView);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user