机器人的WebView的setBackground()不工作 [英] android webview setbackground() doesn't work
本文介绍了机器人的WebView的setBackground()不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有图片的网页视图,我想,当我点击一个按钮来改变的WebView透明的背景...
要做到这一点我用webView.setBackgroundColor(Color.TRANSPARENT);
当我preSS按钮我的WebView不改变它的颜色..我有写的东西在里面,以改变它的颜色I $苯磺酸之后$ PSS按钮。
请问有人知道如何解决这个问题?
感谢您!
解决方案
WebView.setBackgroundColor(0);
WebView.setBackgroundResource(Color.TRANSPARENT);
更新::一定要启用JavaScript!
I have a web view on a picture and I want when I click on a button to change the background of the webview to transparent...
To do so I use webView.setBackgroundColor(Color.TRANSPARENT);
When I press the button my webview doesn't change it's color.. I have to write something in it to change it's color after I press the button..
Does somebody knows how to fix this?
Thank you!
解决方案
WebView.setBackgroundColor(0);
WebView.setBackgroundResource(Color.TRANSPARENT);
Update:: be sure to have Javascript enabled!
这篇关于机器人的WebView的setBackground()不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文