[How to] Is there any trick to send DRAG's signal to a list under a layer?



This issue is like the previous my topic
that previous topic, the solution was fined for the buttons.

But at the current scenario,
the layer (lv_cont) is used to cover a list (lv_list).

When the layer get any SIGNAL from indev,
I can send it to the layer’s child (upper the layer) for some purposes.
Until this step is ok. But some case I wish to send the layer’s SIGNAL
to tell the list (under the layer) for scrolling the list or clicking the list’s elements too.

How to or is there any trick to send any SIGNAL/EVENT to the list
from the layer?

Thank you.

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

  • ESP32

What do you want to achieve?

Scrolling / click the list from the layer that is covering the list.

What have you tried so far?

Tried by lv_obj_set_drag_parent() or lv_page_glue_obj(),
this way can scroll/click the list under the layer,
but can’t use any SIGNAL for the layer’s child.

and tried by sending the layer’s LV_SIGNAL_XXX to the list’s scrl .
and tried by sending the layer’s LV_EVENT_XXX directly to the list.

All are not worked.

Code to reproduce

Screenshot and/or video

Good question. I have no idea how to simply forward the points to the indev handling manually. The problem is that the indev handling already processes the pressing of the upper layer so it can’t handle the list related things at the same time.

Can you describe what is the exact purpose of the upper layer and how it works? Maybe we can find an alternative solution.

Please take look at this PR about gestures.
It seems it very similar to what you want to achieve.

1 Like

Oh, that is a great new feature with propagation from the upper layer.

Thank you very much.

1 Like