Spinner (lv_spinner)¶
Overview¶
The Spinner Widget is a spinning arc over a ring, typically used to show some type of activity is in progress.
Parts and Styles¶
Spinner's parts are identical to those of Arc.
Usage¶
Create a spinner¶
To create a spinner use lv_spinner_create(parent).
Use lv_spinner_set_anim_params(spinner, spin_duration, angle) to customize the duration of one revolution and the length of the arc.
Events¶
No special events are sent by Spinner Widgets.
Keys¶
No Keys are processed by Spinner Widgets.
Further Reading
Learn more about Keys.
Example¶
Simple spinner¶
C code
View on GitHub#include "../../lv_examples.h"
#if LV_USE_SPINNER && LV_BUILD_EXAMPLES
void lv_example_spinner_1(void)
{
/*Create a spinner*/
lv_obj_t * spinner = lv_spinner_create(lv_screen_active());
lv_obj_set_size(spinner, 100, 100);
lv_obj_center(spinner);
lv_spinner_set_anim_params(spinner, 10000, 200);
}
#endif