Hello everyone! I'm having an issue with loading a web url where everything is working fine except for loading background images.
I came across this page:
android css background-image not found
But my question is slightly different. I don't want a background for the entire page body. Instead, I need to display a background image for a specific div.
Here is a snippet of my HTML:
<a href="#WomenMonth"><li data-menuanchor="firstPage" class="manavatarchoose"> test </li> </a>
And here is the CSS code for the div:
.manavatarchoose{
width:206px;
height:206px;float:left;
background-image: url("http://www.example.com/demo/android_connect/assets/img/maleorfe.jpg") ; border-radius:150px; list-style-type: none; vertical-align:middle;
}
Additionally, here is my Java class:
WebView myWebView = (WebView) rootView.findViewById(R.id.webView1);
myWebView.loadUrl("http://www.example.com/demo/android_connect/get_webmob.php");
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
I have also tried using absolute paths for images in the CSS file.
It's worth mentioning that the HTML page displays correctly in the browser, but when loaded within the app, some images and certain stylesheet attributes are not showing up. Any help would be greatly appreciated!