SOLVED How to make lv_tabview work with a simple ENCODER input-driver

Hello,

any idea, how to make lv_tabview work with an ENCODER input-driver ?

Description

I am trying to use a simple ENCODER with LEFT, RIGHT, ENTER for steering the tab-view. Moving from one tab to another… and moving within the tab.

What MCU/Processor/Board and compiler are you using?

ESP32 based M5Stack Core with latest ESP-IDF

What LVGL version are you using?

8.2 LVGL

What do you want to achieve?

use a simple ENCODER with LEFT, RIGHT, ENTER for steering the tab-view. Moving from one tab to another… and moving within the tab

What have you tried so far?

ENCODER working fine for groups with buttons, etc.

For tabviews two alternatives have been tested:
a) adding the tabview to the standard group
b) adding the tabs of the tabview to the standard group

For both see next section.

Code to reproduce

The code block(s) should be formatted like:

    lv_group_t *lvGroup = lv_group_create();
    lv_group_set_default(lvGroup);

    // Create a Tab view object
    lv_obj_t *tabview;
    tabview = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, 20);

    // Add 3 tabs (the tabs are page (lv_page) and can be scrolled
    lv_obj_t *tabAbout = lv_tabview_add_tab(tabview, "About");
    lv_obj_t *tabParing = lv_tabview_add_tab(tabview, "Pairing");
    lv_obj_t *tabStats = lv_tabview_add_tab(tabview, "Stats");

    // Add content to the tabs
    lv_obj_t *label = lv_label_create(tabAbout);
    lv_label_set_text(label, "SmartieNG");

    label = lv_label_create(tabParing);
    lv_label_set_text(label, "Paring");

    const char *data = "Hello world";
    // Create a 100x100 QR code
    lv_obj_t *qr = lv_qrcode_create(tabParing, 100, lv_color_hex3(0x33f), lv_color_hex3(0xeef));
    // lv_scr_act()
    // Set data
    lv_qrcode_update(qr, data, strlen(data));

    label = lv_label_create(tabStats);
    lv_label_set_text(label, "Stats");

    /* THIS is a) */
    lv_group_add_obj(lvGroup, tabview);
  
    /* THIS is b) 
    lv_group_add_obj(lvGroup, tabAbout);
    lv_group_add_obj(lvGroup, tabParing);
    lv_group_add_obj(lvGroup, tabStats);
    */

    lv_obj_scroll_to_view_recursive(label, LV_ANIM_ON);

Screenshot and/or video

none

That was an easy one, neither a) nor b) is needed…
BUT lv_indev_set_group(indev, lvGroup); was missing…
And then everything works perfectly fine.