Is there any way to solve this? i don't want wo show the zoom control buttons in my webview,but it still supporting the zoom controls with mutiTouch.
thanks for your attention.
Is there any way to solve this? i don't want wo show the zoom control buttons in my webview,but it still supporting the zoom controls with mutiTouch.
thanks for your attention.
If you want have zoom in/out without zoom controls then use the below code(copied from here)
public class Main extends Activity {
private WebView myWebView;
private static final FrameLayout.LayoutParams ZOOM_PARAMS =
new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT,
Gravity.BOTTOM);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
myWebView = (WebView)findViewById(R.id.webView);
FrameLayout mContentView = (FrameLayout) getWindow().
getDecorView().findViewById(android.R.id.content);
final View zoom = myWebView.getZoomControls();
mContentView.addView(zoom, ZOOM_PARAMS);
zoom.setVisibility(View.GONE);
myWebView.loadUrl("http://www.almondmendoza.com");
}
}