[BAR] how to use the lv_bar's anim?

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.


the bar’s anim dose’t work.

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

LVGL simulator with VS2019.

What LVGL version are you using?


What do you want to achieve?

set the bar’s value with anim.

What have you tried so far?

if i uselv_bar_set_val(bar,val,LV_ANIM_ON),it could set the value right whithout anim.
so i try the examplelv_example_bar_6,it’s worked right. i want to know what’s the prablem.

Code to reproduce

Screenshot and/or video

Which theme do you use? The default theme sets the style_anim_time on the bar and slider widgets to a reasonable value, however the basic theme leaves it as zero, so the anim time is 0ms.

i use LV_PART_INDICATOR set the style.s anim time ,so why it dosn,t work. and i use “LV_PART_MAIN” worked right.