I want to give color to relative layout as setBackgroundColor()
and the color value is like "#ffffff"
and setBackgroundColor()
dosent accept string value
Asked
Active
Viewed 85 times
1

DEEPAK
- 1,364
- 10
- 24
-
1By the way... `g` is not a valid hex digit, so nothing should accept `"#Fgfff"`. – Amadan Nov 01 '19 at 07:41
-
1oops that was typo mistake , its #ffffff – DEEPAK Nov 01 '19 at 08:30
1 Answers
0
You can Use the below code:-
Relativelayout.setBackgroundColor(Color.parseColor("#ffffff"))

Venkatesh
- 190
- 4
- 9
-
1`RelativeLayout` doesn't have the `setCardBackgroundColor` method. – Gabriele Mariotti Nov 01 '19 at 07:50