Is there such a method call “getBackgroundColor”?

前端 未结 6 1782
旧巷少年郎
旧巷少年郎 2021-01-17 07:29

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)

6条回答
  •  南笙
    南笙 (楼主)
    2021-01-17 08:17

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

    It will be something like that :

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

提交回复
热议问题