android - Load CSS file from assets to a WebView with custom HTML and predefined Base URL -
i need load html construct @ runtime webview , apply css file placed in assets directory . , already have base url need provide webview's loaddatawithbaseurl function. code snippet (not applying css file): stringbuffer buff = new stringbuffer(); buff.append("<head>"); buff.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_asset/my_css_file.css\"/>"); buff.append("</head>"); buff.append("<div class=\"announcement-header\">"); buff.append("header"); buff.append("</div>"); buff.append("<div class=\"announcement-separator\"></div>"); buff.append("<div class=\"announcement\">"); buff.append("content"); buff.append("</div>") webview.loaddatawithbaseurl(my_base_url, buff.tostring(), "text/html", http.utf_8, null); i've looked @ ...