Description
I have a button which I set as a toggle:
lv_obj_add_flag(btnV1, LV_OBJ_FLAG_CHECKABLE);
I set a custom background color for when the button is checked:
lv_obj_set_style_bg_color(btnV1,lv_palette_main(ser1Color), LV_IMAGEBUTTON_STATE_CHECKED_RELEASED);
When I hit the button, it changes to the custom color.
When I touch anything else on the screen, this button reverts to the standard red for toggled button.
What am I missing here?
What MCU/Processor/Board and compiler are you using?
ESP32 CYD
VScode/Arduino
What LVGL version are you using?
9.1
What do you want to achieve?
Toggle button keeps the custom color also when not in focus.
What have you tried so far?
- tried to find any documentation about all these button states, to no avail.