CB-9158 - InAppBrowser zoomControls are always set to true
This commit is contained in:
parent
cb1c6b4d24
commit
74aa099b7e
@ -91,9 +91,9 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
private boolean showLocationBar = true;
|
||||
private boolean showZoomControls = true;
|
||||
private boolean openWindowHidden = false;
|
||||
private boolean clearAllCache= false;
|
||||
private boolean clearSessionCache=false;
|
||||
private boolean hadwareBackButton=true;
|
||||
private boolean clearAllCache = false;
|
||||
private boolean clearSessionCache = false;
|
||||
private boolean hadwareBackButton = true;
|
||||
|
||||
/**
|
||||
* Executes the request and returns PluginResult.
|
||||
@ -348,7 +348,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
} else {
|
||||
intent.setData(uri);
|
||||
}
|
||||
intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName());
|
||||
intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName());
|
||||
this.cordova.getActivity().startActivity(intent);
|
||||
return "";
|
||||
} catch (android.content.ActivityNotFoundException e) {
|
||||
@ -373,11 +373,11 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
childView.setWebViewClient(new WebViewClient() {
|
||||
// NB: wait for about:blank before dismissing
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
if (dialog != null) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
});
|
||||
if (dialog != null) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
});
|
||||
// NB: From SDK 19: "If you call methods on WebView from any thread
|
||||
// other than your app's UI thread, it can cause unexpected results."
|
||||
// http://developer.android.com/guide/webapps/migrating.html#Threads
|
||||
@ -455,15 +455,6 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
return this.showLocationBar;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we show the zoom controls?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private boolean getShowZoomControls() {
|
||||
return this.showZoomControls;
|
||||
}
|
||||
|
||||
private InAppBrowser getInAppBrowser(){
|
||||
return this;
|
||||
}
|
||||
@ -656,7 +647,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
WebSettings settings = inAppWebView.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
settings.setBuiltInZoomControls(getShowZoomControls());
|
||||
settings.setBuiltInZoomControls(showZoomControls);
|
||||
settings.setPluginState(android.webkit.WebSettings.PluginState.ON);
|
||||
|
||||
//Toggle whether this is enabled or not!
|
||||
|
Loading…
Reference in New Issue
Block a user