How to set background linear color by shared preferences from a textview from users in app in Sketchware

285 Views Asked by At

I'm trying to set background colors to linears, so users can customize their own screen with a color picker. Each time though I try to set a string or shared preference to the code it crashes or says method string int not valid for this type. I've tried number variables strings and shared preference they still won't work. I'm using sketchware so the coding is not the same as regular coding neither am I proficient at such it doesn't seem to work well since I can't edit manifest in app. Thanks

1

There are 1 best solutions below

0
On

In case anyone needs to find this out, add string c or whatever u want to call it in more block, then add numbers/letters in string plus the first FF(example FF022a49) in C string on more block. linear1.setBackgroundColor(Color.parseColor("#"+_c));