- Create a new Android Application Project in Eclipse
- Give application name,
project name, package name and other details and click on next
- Select Icon Type and path and click on next
4. Select Activity type and click on next.
5. Inside Activity_main.xml,
use below codes for WebView
<WebView
android:id="@+id/activity_main_webview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
6. Inside MainActivity.java
type following codes
private WebView myWebView;
Inside on_create section
WebView myWebView =
(WebView) findViewById(R.id.activity_main_webview);
WebSettings
webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.setWebViewClient(new
WebViewClient());
myWebView.loadUrl("http://bankinggear.blogspot.in/");
7. Put cursor over
WebView an select ‘Import “WebView” (android webkit)
Comments
Post a Comment