This works well in my case. Try this for your business.
In the manifest file.
<uses-permission android:name="android.permission.INTERNET"> </uses-permission>
webview.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <WebView android:id="@+id/webView" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout>
In activity ..
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); this.setContentView(R.layout.webview); this.myWebView = (WebView) this.findViewById(R.id.webView); FrameLayout mContentView = (FrameLayout) getWindow(). getDecorView().findViewById(android.R.id.content); final View zoom = this.myWebView.getZoomControls(); mContentView.addView(zoom, ZOOM_PARAMS); zoom.setVisibility(View.GONE); this.myWebView.loadUrl("http://www.facebook.com"); } }
ridoy source share