Lvgl V8.3 ,tabview stay between tab1 and tab2,not snap to tab1 / tab2

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.


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


What LVGL version are you usinginux?


What do you want to achieve?

tabview snap to tab1/tab2/tab2,insted of between them

What have you tried so far?

I attempted to print the scroll x position in lv_tabview.c,my screen is 1024*60,the result is 0-1024-2048,that match three tabs,but what i see is the tabview stay bewteen tab1&tab2

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:

## Screenshot and/or video
If possible, add screenshots and/or videos about the current state.

when i click the button ,it can scroll to the des tab,but when i slide the screen,it may happen sometimes(between tab1&tab2)

Odd, might I suggest changing the configuration option LV_USE_LARGE_COORD to 1 in lv_conf.h.
Happens very often with rollers too when the data inside takes up a lot of pixels, do not ask me what the LV_USE_LARGE_COORD setting is for but it often fixes things like this.

thanks bro,but i check my lv_conf.h,LV_USE_LARGE_COORD has already been set to 1,but the problem still exists

Are you sure

  • lv_tick_inc() and lv_timer_handler is called periodically?
  • the program is not crashed and frozen

I set #define LV_TICK_CUSTOM 1 last time,so I didn’t call the lv_tick_inc(),but the lv_timer_handler is called periodically like this

	while (1)
		usleep(5 * 1000);		

The program is running normally. When I click the tabview button or swipe again, the screen will be normal