机器人:背景是不工作的WebView? [英] android:background is not working with WebView?
本文介绍了机器人:背景是不工作的WebView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于某种原因IM无法更改的XML使用 Android的一个空的web视图的背景色:背景
。虽然我可以用Java code。使用这样的改变:
For some reason im unable to change the background color of an empty webView in xml using android:background
. Although I could change it in java code using something like this:
myWebView.setBackgroundColor(Color.parseColor("#D4CAB4"));
但我preFER做的XML和我找不到为什么 Android的原因:背景
不工作?
推荐答案
如果可以在XML布局中设置的WebView背景颜色答案NO并背后的原因是:
If one can set WebView background color in xml layout the answer is "NO" and the reason behind is:
- 的WebView的设置背景颜色。 (XML布局)
- 您在活动课上web视图加载数据。
- 您在步骤1中设置的背景将被忽略,默认颜色将被设置。
- 的唯一方法,左边是设置的WebView的背景数据加载后。
我希望这可以帮助你了解这里的情况。
I hope this can help you to understand the case here.
这篇关于机器人:背景是不工作的WebView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文