Minor tweaks to DroidGap, allows for the ChromeClient and ViewClient to be overridden

This commit is contained in:
Joe Bowser 2012-03-29 12:03:20 -07:00
parent b793fbfc28
commit 49b50ce66c
2 changed files with 3 additions and 4 deletions

View File

@ -33,13 +33,11 @@ public class CordovaWebView extends WebView {
/** Actvities and other important classes **/ /** Actvities and other important classes **/
private Context mCtx; private Context mCtx;
private CordovaWebViewClient viewClient;
private CordovaChromeClient chromeClient;
public CordovaWebView(Context context) { public CordovaWebView(Context context) {
super(context); super(context);
mCtx = context; mCtx = context;
setup(); //setup();
} }
public CordovaWebView(Context context, AttributeSet attrs) { public CordovaWebView(Context context, AttributeSet attrs) {
@ -61,7 +59,7 @@ public class CordovaWebView extends WebView {
setup(); setup();
} }
private void setup() public void setup()
{ {
this.setInitialScale(0); this.setInitialScale(0);
this.setVerticalScrollBarEnabled(false); this.setVerticalScrollBarEnabled(false);

View File

@ -278,6 +278,7 @@ public class DroidGap extends Activity implements CordovaInterface {
// white list of allowed URLs // white list of allowed URLs
// debug setting // debug setting
this.loadConfiguration(); this.loadConfiguration();
this.appView.setup();
this.appView.setLayoutParams(new LinearLayout.LayoutParams( this.appView.setLayoutParams(new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,