Is there anyway I can fix a webview?
- by Legend
I am trying to load a webpage into a sample webview that I created:
public class HelloWebview extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView webview;
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setDefaultZoom(ZoomDensity.FAR);
webview.setHorizontalScrollBarEnabled(false);
webview.setVerticalScrollBarEnabled(false);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("http://10.0.2.2/index.html");
}
}
Initially, I had a problem with the scrollbars so I added the two lines to disable them. Now, I am still able to pan around the webpage though the scroll bars are not visible. How can I fix the view so that I am not able to pan (or scroll) the webpage? By panning, I mean moving around the webpage with an onTouch event.