satyamurthy_hyd
Lurker
Hi,
I have Hexadecimal value and need to assign to a button's background by setBackgroundColor(),but getting Runtime Exception: see the code snippet below with exception output. Please help me resolve this
String strColor="0xFFF3ECE0";
int intColor= Integer.parseInt(strColor,16);
button1.setBackgroundColor(intColor);
ERROR/AndroidRuntime(874): java.lang.NumberFormatException: unable to parse '0xFFF3ECE0' as integer
I have Hexadecimal value and need to assign to a button's background by setBackgroundColor(),but getting Runtime Exception: see the code snippet below with exception output. Please help me resolve this
String strColor="0xFFF3ECE0";
int intColor= Integer.parseInt(strColor,16);
button1.setBackgroundColor(intColor);
ERROR/AndroidRuntime(874): java.lang.NumberFormatException: unable to parse '0xFFF3ECE0' as integer
