Description
What MCU/Processor/Board and compiler are you using?
stm32 and Vscood
What LVGL version are you using?
lvgl8.3.10
What do you want to achieve?
When we open the navigation bar at the top of the phone, we see a white volume adjustment ui, which is exactly what I want :
1, no knob click event;
2, in any position of the slider can slide, as in the picture, and the progress of the slider and drag distance is relative.
What have you tried so far?
I’ve created the style, but for its event handling, it’s been a week and I still haven’t been able to implement it. I tried using knob only mode:
lv_obj_add_flag(slider, LV_OBJ_FLAG_ADV_HITTESTE)
Trying to get the touch position of the pressed event, calculating the distance moved to update the value of the slider, but obviously I didn’t achieve my goal.
I’m glad there are open source projects like lvgl and forums where I can learn and discuss issues, but it’s a bit difficult, so I’m publishing this article for your help! >.<