Issue
In my app,i want to display the HTML files in my assets folder in WebView.I tried this
wv.loadUrl("file:///android_asset/sample.html");
This is working.But what i want is a method which can be called anywhere and pass the html file in assets as parameter and display it in the WebView.Somebody please help me...
Solution
Create A public method which uses webview and pass String of ur String
public void setUrl(String urlString){
{
wv.loadUrl(urlString);
}
For this your WebView must have Global scope. Then only u can access it.
call anywhere like setUrl(path);
Answered By - Top Cat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.