mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Setting up a default CordovaWebViewClient and CordovaChromeClient for when we are blowing up via XML layouts
This commit is contained in:
parent
afa1ecf3c5
commit
f840f3aceb
@ -92,6 +92,7 @@ public class CordovaWebView extends WebView {
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* @param context
|
* @param context
|
||||||
* @param attrs
|
* @param attrs
|
||||||
*/
|
*/
|
||||||
@ -105,7 +106,8 @@ public class CordovaWebView extends WebView {
|
|||||||
{
|
{
|
||||||
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
||||||
}
|
}
|
||||||
|
this.setWebChromeClient(new CordovaChromeClient(this.mCtx));
|
||||||
|
this.setWebViewClient(new CordovaWebViewClient(this.mCtx));
|
||||||
this.loadConfiguration();
|
this.loadConfiguration();
|
||||||
this.setup();
|
this.setup();
|
||||||
}
|
}
|
||||||
@ -116,7 +118,7 @@ public class CordovaWebView extends WebView {
|
|||||||
* @param context
|
* @param context
|
||||||
* @param attrs
|
* @param attrs
|
||||||
* @param defStyle
|
* @param defStyle
|
||||||
* @throws CordovaException
|
*
|
||||||
*/
|
*/
|
||||||
public CordovaWebView(Context context, AttributeSet attrs, int defStyle) {
|
public CordovaWebView(Context context, AttributeSet attrs, int defStyle) {
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
@ -128,6 +130,8 @@ public class CordovaWebView extends WebView {
|
|||||||
{
|
{
|
||||||
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
||||||
}
|
}
|
||||||
|
this.setWebChromeClient(new CordovaChromeClient(this.mCtx));
|
||||||
|
this.setWebViewClient(new CordovaWebViewClient(this.mCtx));
|
||||||
this.loadConfiguration();
|
this.loadConfiguration();
|
||||||
this.setup();
|
this.setup();
|
||||||
}
|
}
|
||||||
@ -150,6 +154,8 @@ public class CordovaWebView extends WebView {
|
|||||||
{
|
{
|
||||||
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
Log.d(TAG, "Your activity must implement CordovaInterface to work");
|
||||||
}
|
}
|
||||||
|
this.setWebChromeClient(new CordovaChromeClient(this.mCtx));
|
||||||
|
this.setWebViewClient(new CordovaWebViewClient(this.mCtx));
|
||||||
this.loadConfiguration();
|
this.loadConfiguration();
|
||||||
this.setup();
|
this.setup();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user