Hey
@virjog thanks alot for this!
Btw, how'd you converted the polymer based web app into an .apk? can you provide some details/tut on how to do that if it does not bothers you? just for our project on school, hehe thank you!
EDIT
Oh ok so this is supposedly a webview app, hearing more details would be nice. Thanks!
All you have to do is create a WebView application. To achieve this you can do it by pressing a button or doing something. But I believe you want to load a page right away like the guy has done for this Calculator.
First you'll need to prepare a layout with the WebView element. Make sure the WebView fills the whole parent. Then give it an appropriate id. Something like - @+id/WebView or whatever you wish.
Next you will need to go into the code and add the following.
Import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView; *
public class WebViewActivity extends Activity { * private WebView webView; * public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.webView); * webView = (WebView) findViewById(R.id.webView); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("yourwebsite.com"); * } * }
And it should automatically load your website.