有这样一个方法调用" getBackgroundColor"? [英] Is there such a method call "getBackgroundColor"?

查看:520
本文介绍了有这样一个方法调用" getBackgroundColor"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有这样的方法调用的TextViewgetBackgroundColor? 在一个的LinearLayout TV1和TV2:如果我得到2 textViews。我做了什么:tv1.setBackgroundColor(Color.BLUE)

Is there such a method call "getBackgroundColor" in TextView?? if I got 2 textViews: tv1 and tv2 in one LinearLayout. what i did:tv1.setBackgroundColor(Color.BLUE)

现在,如果我想TV2的setBackgroundColor一样的TV1,我怎么能先升后得到的backgroundColor 在TV1 setBackgroundColor TV2的。

now if i wanna setBackgroundColor of tv2 as the same as tv1, how can i get the backgroundColor in tv1 first and then setBackgroundColor of tv2.

THX这么多的帮助!

thx so much for the help!!

推荐答案

您将在这里找到解决方案: <一href="http://groups.google.com/group/android-developers/browse_thread/thread/4910bae94510ef77/59d4bb35e811e396?pli=1">http://groups.google.com/group/android-developers/browse_thread/thread/4910bae94510ef77/59d4bb35e811e396?pli=1

You will find the solution here : http://groups.google.com/group/android-developers/browse_thread/thread/4910bae94510ef77/59d4bb35e811e396?pli=1

这将是类似的东西:

((PaintDrawable) tv.getBackground()).getPaint()

这篇关于有这样一个方法调用&QUOT; getBackgroundColor&QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆