barx Well-Known Member Licensed User Longtime User Mar 11, 2012 #1 I have a webview on a black background and use the following code to show a image AND channge the background color to black to match the rest of the activity. Code: Copy strHTML = "<html><body bgcolor = #000000><img src='file:///android_asset/selectarrow.png' /><br /><h1><font color=#444444>Tap to Select</font></h1></body></html>" WebBody.LoadHtml(strHTML) WebBody.Visible = True When the activity is loaded the webview flashes white for a split second the goes black as required. I'd hoped that making .visible = false (done in designer), loading the html, then making it visible again would avoid this happening but it still shows. How would one avoid this. Would I have to implement a timer to delay the visibility by say 500ms? cheers
I have a webview on a black background and use the following code to show a image AND channge the background color to black to match the rest of the activity. Code: Copy strHTML = "<html><body bgcolor = #000000><img src='file:///android_asset/selectarrow.png' /><br /><h1><font color=#444444>Tap to Select</font></h1></body></html>" WebBody.LoadHtml(strHTML) WebBody.Visible = True When the activity is loaded the webview flashes white for a split second the goes black as required. I'd hoped that making .visible = false (done in designer), loading the html, then making it visible again would avoid this happening but it still shows. How would one avoid this. Would I have to implement a timer to delay the visibility by say 500ms? cheers
NJDude Expert Licensed User Longtime User Mar 11, 2012 #2 Try this: Code: Copy WebView1.Color = Colors.Transparent Upvote 0
barx Well-Known Member Licensed User Longtime User Mar 11, 2012 #3 Ahh, didn't think of changing colour of the actual webview. I'm so dumb at time :signOops: All sorted now though cheers Dude Upvote 0
Ahh, didn't think of changing colour of the actual webview. I'm so dumb at time :signOops: All sorted now though cheers Dude
reikhard Member Licensed User Longtime User Sep 5, 2013 #4 How can I change the font color? for example : the default is white background color, the text is black. I need to change it to black background and white font. Should I load the html with a define color for the font in this case white font. I dont want to create a different html for each file... Any ideas? Please? Upvote 0
How can I change the font color? for example : the default is white background color, the text is black. I need to change it to black background and white font. Should I load the html with a define color for the font in this case white font. I dont want to create a different html for each file... Any ideas? Please?
NJDude Expert Licensed User Longtime User Sep 5, 2013 #5 You can only change the background color, what you're asking has to be done in the HTML document. Upvote 0