List of usage examples for android.webkit WebView getResources
public Resources getResources()
From source file:com.appnexus.opensdk.MRAIDImplementation.java
String onPreLoadContent(WebView wv, String html) { // Check to ensure <html> tags are present if (!html.contains("<html>")) { html = "<html><head></head><body style='padding:0;margin:0;'>" + html + "</body></html>"; } else if (!html.contains("<head>")) { // The <html> tags are present, but there is no <head> section to // inject the mraid js html = html.replace("<html>", "<html><head></head>"); }//from ww w . ja va2 s . co m // Insert mraid script source html = html.replace("<head>", "<head><script>" + getMraidDotJS(wv.getResources()) + "</script>"); return html; }