1. Download our Official Android App: Forums for Android!

satyamurthy

Discussion in 'Introductions' started by satyamurthy_hyd, Jul 28, 2010.

  1. satyamurthy_hyd

    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    4
    Joined:
    Jul 28, 2010

    Jul 28, 2010
    4
    0
    25
    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
     

    Advertisement

  2. satyamurthy_hyd

    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    4
    Joined:
    Jul 28, 2010

    Jul 28, 2010
    4
    0
    25
    Do we have any Data bind UI controls in Android?
     
  3. Steven58

    Steven58 Reformed PH
    Rank:
     #4
    Points:
    3,933
    Posts:
    32,959
    Joined:
    Feb 19, 2010

    Feb 19, 2010
    32,959
    25,351
    3,933
    Male
    Welcome to Android Forums! :)
     
  4. G.Armour

    G.Armour You know you want to.
    Rank:
    None
    Points:
    183
    Posts:
    4,534
    Joined:
    Jan 11, 2010

    Jan 11, 2010
    4,534
    306
    183
    Truck driver/ driver mentor. I train people to dri
    Georgia
    Wow. Welcome!
     

Share This Page

Loading...