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
Hi guys,I just wanna know,how can I scroll right from the first item to the last item in a chain of items?
I have no idea,maybe you guys can help me and give me some thoughts.
What MCU/Processor/Board and compiler are you using?
it doesn’t matter.
What LVGL version are you using?
released 8.2.0
What do you want to achieve?
Just like I said above,just want to achieve scrolling circularly in any situations.
What have you tried so far?
I thought so much,but I didn’t know how to do it,
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:
/*Just like a simple code right here*/
lv_obj_t *parent = lv_obj_create(lv_scr_act());
lv_obj_set_size(parent, 240, 240);
lv_obj_center(parent);
lv_obj_t *item_1 = lv_obj_create(parent);
lv_obj_set_size(item_1, 240, 240);
lv_obj_center(item_1);
lv_obj_t *item_2 = lv_obj_create(parent);
lv_obj_set_size(item_2, 240, 240);
lv_obj_align_to(item_2, item_1, LV_ALIGN_TOP_RIGHT, 240, 0);
lv_obj_t *item_3 = lv_obj_create(parent);
lv_obj_set_size(item_3, 240, 240);
lv_obj_align_to(item_3, item_2, LV_ALIGN_TOP_RIGHT, 240, 0);
/* So code above form a chain of items,like 1-2-3,and I don't how to scroll 1 right to let screen focus on 3*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.