use of android.widget.ZoomButtonsController in project KJFrameForAndroid by kymjs.
the class UIHelper method initWebView.
@SuppressLint({ "JavascriptInterface", "SetJavaScriptEnabled" })
public static void initWebView(WebView webView) {
WebSettings settings = webView.getSettings();
settings.setDefaultFontSize(15);
settings.setJavaScriptEnabled(true);
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
int sysVersion = Build.VERSION.SDK_INT;
if (sysVersion >= 11) {
settings.setDisplayZoomControls(false);
} else {
ZoomButtonsController zbc = new ZoomButtonsController(webView);
zbc.getZoomControls().setVisibility(View.GONE);
}
webView.setWebViewClient(UIHelper.getWebViewClient());
}
use of android.widget.ZoomButtonsController in project robolectric by robolectric.
the class ShadowMapView method __constructor__.
public void __constructor__(Context context, AttributeSet attributeSet) {
setContextOnRealView(context);
this.attributeSet = attributeSet;
zoomButtonsController = new ZoomButtonsController(realMapView);
invokeConstructor(View.class, realView, ClassParameter.from(Context.class, context), ClassParameter.from(AttributeSet.class, attributeSet), ClassParameter.from(int.class, 0));
invokeConstructor(ViewGroup.class, realView, ClassParameter.from(Context.class, context), ClassParameter.from(AttributeSet.class, attributeSet), ClassParameter.from(int.class, 0));
}
use of android.widget.ZoomButtonsController in project robolectric by robolectric.
the class ShadowMapView method __constructor__.
@Override
public void __constructor__(Context context, AttributeSet attributeSet, int defStyle) {
setContextOnRealView(context);
this.attributeSet = attributeSet;
zoomButtonsController = new ZoomButtonsController(realMapView);
invokeConstructor(View.class, realView, ClassParameter.from(Context.class, context), ClassParameter.from(AttributeSet.class, attributeSet), ClassParameter.from(int.class, defStyle));
invokeConstructor(ViewGroup.class, realView, ClassParameter.from(Context.class, context), ClassParameter.from(AttributeSet.class, attributeSet), ClassParameter.from(int.class, defStyle));
super.__constructor__(context, attributeSet, defStyle);
}
use of android.widget.ZoomButtonsController in project android-vertical-slide-view by xmuSistone.
the class CustWebView method getControlls.
private void getControlls() {
try {
Class<?> webview = Class.forName("android.webkit.WebView");
Method method = webview.getMethod("getZoomButtonsController");
ZoomButtonsController zoomController = (ZoomButtonsController) method.invoke(this);
} catch (Exception e) {
e.printStackTrace();
}
}
use of android.widget.ZoomButtonsController in project android_frameworks_base by ParanoidAndroid.
the class ZoomControlEmbedded method getControls.
private ZoomButtonsController getControls() {
if (mZoomButtonsController == null) {
mZoomButtonsController = new ZoomButtonsController(mWebView.getWebView());
mZoomButtonsController.setOnZoomListener(new ZoomListener());
// ZoomButtonsController positions the buttons at the bottom, but in
// the middle. Change their layout parameters so they appear on the
// right.
View controls = mZoomButtonsController.getZoomControls();
ViewGroup.LayoutParams params = controls.getLayoutParams();
if (params instanceof FrameLayout.LayoutParams) {
((FrameLayout.LayoutParams) params).gravity = Gravity.END;
}
}
return mZoomButtonsController;
}
Aggregations