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)
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?
There is a better solution than bourbons:
((ColorDrawable)view.getBackground()).getColor();
The advantage is we get an integer which is comparable to color enums given by Color class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With