I have a web page stored in my res/raw folder in android app. I want to access it and load it in the webview in my activity. Can anyone please tell me how am I supposed to do that.
I have tried
webView.loadUrl(getResources().openRawResource(R.raw.myHtmlPage).toString());
but it dint work rather it gives a broken page.
kindly help me out.
regards
FAS
Do you mean you have the raw html as a string such as
"<html>...</html>"?If so then
Webview.loadData()orWebview.loadDataWithBaseUrl()should work.