I am trying to convert a hex value to an int so I can create a new color drawable. I\'m not sure if this is possible, but according to the documentation, it should. It plainly a
By followingthe above advice,to be a summary of this question:
ColorDrawable colorDrawable = new ColorDrawable(Color.parseColor("#ce9b2c"));`
ColorDrawable colorDrawable = new ColorDrawable(0xFFCE9B2C); Note there is 8 hex digits, not 6 hex digit,which no work. Case all
ColorDrawable colorDrawable = new ColorDrawable(ContextCompat.getColor(mContext,R.color.default_color));
Selecting up to you!