I want to achieve a sliding function similar to the one shown in the figure below, is there a demo reference?

I want to achieve a sliding function similar to the one shown in the figure below, is there a demo reference?

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.

Description

I want to achieve a sliding function similar to the one shown in the figure below, is there a demo reference?

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

esp32

What LVGL version are you using?

V7.x

What do you want to achieve?

I want to achieve a sliding function similar that can show menu image like the wathch

What have you tried so far?

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.
demo

Do you also want the selected image scale smoothly as it approaches the center?

Anyway, in v it’d be much simpler. In v8 there is

  • snapping to automatically snap children to the center of the parent
  • events on scrolling to change zoom based on the current x position

So is is it an option to update to v8?

thank you for your reply
yeap,now I had update the version to v8,and what I want to do is as you said “selected image scale smoothly as it approaches the center”
but my question is below:
1、how can I get the x position of an image
2、And I am using the encoder but not touch pad,how to set the image obj to be controled by encoder or keys

I think you need to combine these two examples:

thanks a lot