Java/Android String to Color conversion

后端 未结 4 1290
长发绾君心
长发绾君心 2021-02-15 02:12

I\'m making an app and I\'d like to be able to set various colors via user input(edittext) and hex values e.g. #eeeeee and so on. Problem is I cannot seem to figure out how to c

4条回答
  •  一向
    一向 (楼主)
    2021-02-15 02:53

    StringBuffer hexString = new StringBuffer();
    hexString.append(Integer.toHexString(0xFF);
    System.out.print(hexString.toString());
    

提交回复
热议问题