Wednesday, March 23, 2011

Mobile WebApps in Android with HTML5

Mobile WebApps in Android with HTML DOWNLOAD SOURCE CODE
 Now you can develop Mobile WebApps in android using HTML5







screen shot.


Source Code
goto assets folder->create one file->file.html.

<!DOCTYPE html>
<html>
<head  >
<body style="background-color:#000000;">
<div id="logo"><a href="http://iamvijayakumar.blogspot.com/">
<marquee behavior="alternate" style="color:#ffffff">iamvijayakumar.blogspot.com</marquee>
</a></div>
</body>
</head>
</html>



Activity code

public class WebviewActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        WebView webView = (WebView) findViewById(R.id.webview);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebChromeClient(new WebChromeClient());
        webView.loadUrl("file:///android_asset/webview/home.html");
    }
}

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...