Description
How to get LV_EVENT_GESTURE for lv_page?
What MCU/Processor/Board and compiler are you using?
ESP32
What do you want to achieve?
I would like the lv_page can receive LV_EVENT_GESTURE.
What have you tried so far?
I tried the following code for testing event_cb for lv_page.
However the page can’t receive LV_EVENT_GESTURE in the page’s event_cb.
Code to reproduce
void page_event_cb(lv_obj_t* page, lv_event_t event){
if( event == LV_EVENT_GESTURE){
Serial.println("EVENT_GESTURE");
}
}
void page_create() {
page = lv_page_create(lv_scr_act(), NULL);
lv_obj_set_size(page, 400,300);
lv_obj_align(page, NULL, LV_ALIGN_CENTER,0,0);
lv_obj_set_gesture_parent(page, false);
lv_obj_set_event_cb(page, page_event_cb);
}
page_create();