Hi All,
See this code for incorporating Webview.
First of all we have to place one Webview component in the activity. Then add this code in the onCreate() function.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.hupweblayout);
hupwebview=(WebView)findViewById(R.id.webView);
hupwebview.getSettings().setJavaScriptEnabled(true);
hupwebview.loadUrl("http://www.servetechnoresearch.com");
}
Add this line in the manifest file.
<uses-permission android:name="android.permission.INTERNET" />
See this code for incorporating Webview.
First of all we have to place one Webview component in the activity. Then add this code in the onCreate() function.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.hupweblayout);
hupwebview=(WebView)findViewById(R.id.webView);
hupwebview.getSettings().setJavaScriptEnabled(true);
hupwebview.loadUrl("http://www.servetechnoresearch.com");
}
Add this line in the manifest file.
<uses-permission android:name="android.permission.INTERNET" />
No comments:
Post a Comment