将TextView backgroundColor设置为我想要的任何内容后。如何将TextView背景颜色更改为初始值
Fri2030 =(TextView)findViewById(R.id.tvFri2030); Fri2030.setBackgroundColor(Color.BLUE);
如何清理TextView backgroundColor如果我不想要任何颜色并初始化它。 (不想被其他颜色覆盖)
thx的帮助!
将TextView backgroundColor设置为我想要的任何内容后。如何将TextView背景颜色更改为初始值
Fri2030 =(TextView)findViewById(R.id.tvFri2030); Fri2030.setBackgroundColor(Color.BLUE);
如何清理TextView backgroundColor如果我不想要任何颜色并初始化它。 (不想被其他颜色覆盖)
thx的帮助!
愿这帮助你......一旦存储所有这些价值,后来当你需要它 然后用它们上---
TextView text=new TextView(this);
text.getCurrentHintTextColor();
text.getCurrentTextColor();
text.getDrawingCacheBackgroundColor();
setBackgroundColor(android.R.color.transparent);
不明确的问题。你到底想做什么?你想添加或不添加颜色。如果不只是评论该代码 – 2012-01-13 08:32:45
@ Rashmi.B:他想要恢复默认颜色,如果事情动态发生。评论代码不是解决方案。 – Sameer 2012-01-13 08:40:33
if(condition){set this color} else if(condition){set this color}这就是我所能说的。我仍然不清楚他想要什么 – 2012-01-13 08:43:12