Hi…
Is possible an easy way to modify preload from arc to bar animation?
Or a QUICK and DIRTY set of animation of bar object that works similar as preloder?
Not from 0 to 100 %, but also a continous moving 30 % as like a snake.
I hope can undertand what I’d like.
You can animate changing a bar’s value. Please read the documentation.
Is that what you were asking?
Here’s an example that you could customize to meet your requirements:
lv_obj_t * bar = lv_bar_create(lv_scr_act(), NULL);
lv_bar_set_range(bar, 0, 100);
lv_bar_set_anim_time(bar, 250); /* 250 milliseconds to move from 0 to 100 */
lv_bar_set_value(bar, 100, LV_ANIM_ON);
Thanks…but I’d like differnt.
Ithink it will be animate from 0 to 100%.
May be, my english is poor, so you misunderstanded me.
When increase 0 to 100 % it is foreshadows that the process will end at 100 %.
But the time can’t be forecast exactly.
The user thinks it will be end when 100%, but it is not true.
I’d like a moving snake, like bellow. Just lika a preloder but not ARC !
III------------
–IIIIIII------
----IIIIIII—
-------IIIIIII
II-----------
So you’re looking for a marquee mode for the progress bar?
Yes !!!
But I did not remember the “marquee” expression !
Thanks
Merry Christmas
and
Happy New Year for everybody
@embeddedt just added a feature to the bar set the start value too.
It’s in the dev-7.0
branch. See:
Using this and the “normal” lv_bar_set_value
you should be able to create an animation like this.