I have a code snippet to show you below and I am trying to change view's(v) background. I'll get color code from a TextView
(dragged) and change View
(v)'s background by using this code. But I get an error as indicate above. How can I fix it? Where is the problem? Thanks.
ColorDrawable cd = (ColorDrawable)dragged.getBackground();
int colorCode = cd.getColor();
v.setBackgroundColor(colorCode);
TextView
s background color. I will get this color from anotherTextView
(dragged). Also I need this color's code to use in my code to store an array that store color's code. – ParamedicalTextView
(dragged) oval. Is it can cause this? ıf it is, what should I do? – ParamedicalTextViews
look rectangle but I want to this oval. Is there another way to oval by using above my code? Because I need both of them? If not I continue as rectangle textViews – Paramedical