I have a task to access whole HTML project (with CSS, etc.) in my android project. Can anyone help me on that? I googled about it, but all I found was “Webview”, which I already know.
I a\want to know where I can put the CSS files, html files in my Android project and how can I manage whole HTML project? (i.e. transition from one page to other, etc.) Please suggest me some good document or tutorial if you know about this. If webview is the only way, how can I switch from one page to another? Because all I know is to use
myWebView.loadUrl(Uri.fromFile(www.website.com);
I have also managed to load a single html file from sdcard.
myWebView.loadUrl(Uri.fromFile(
new File(Environment.getExternalStorageDirectory()
.getAbsolutePath() + File.separator + "index.html"))
.toString());
But I don’t understand how I can proceed for a whole project!
Any help would be highly appreciated.
You need to use webView that is for sure.
For that you can put you whole HTML (css,js,html) in asset folder and load local index.html in webview just like.
And webview will load whole local site. .css and js will be directly handle by webview it self even hyperlink will also work.
You can also customize you webview and listen js call for making hybrid app. But this is only for hybrid app.
Hope this help.