在Android版+ Xperia X10的复选框的背景问题 [英] CheckBox background issue in Android + Xperia x10
本文介绍了在Android版+ Xperia X10的复选框的背景问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过code设置CheckBox的的backgroundColor。
它不工作的Xperia系列。同样的code测试了这是工作在三星和摩托罗拉等deices。
I am trying to set backgroundColor of CheckBox by code. Its not working on xperia series. same code has tested other deices which is working on samsung and motorola.
CheckBox checkBox = (CheckBox) findViewById(R.id.checkbox);
checkBox.setBackgroundColor(Color.RED);
这是显示黑色的背景仅XPERIA。
如果我这样做,通过XML正在工作。
that is showing black background in xperia only. If I am doing that by xml that is working.
请让我知道如果有一个Xperia系列的任何已知问题。
Please let me know if there is any known issue for xperia series.
先谢谢了。
推荐答案
有可能会出现一些问题,与XPERIA到setBackgroundColor()。但它与setDrawingCacheBackgroundColor();
There may be some issue with xperia to setBackgroundColor(). but it works with setDrawingCacheBackgroundColor();
CheckBox checkBox = (CheckBox) findViewById(R.id.checkbox);
checkBox.setDrawingCacheEnabled(true);
checkBox.setDrawingCacheBackgroundColor(Color.RED);
这篇关于在Android版+ Xperia X10的复选框的背景问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文