Spinner (lv_spinner)¶
Overview¶
The Spinner object is a spinning arc over a ring.
Usage¶
Create a spinner¶
To create a spinner use lv_spinner_create(parent, spin_time, arc_length)
. spin time
sets the spin time in milliseconds, arc_length
sets the length of the spinning arc in degrees.
Events¶
No special events are sent by the Spinner.
See the events of the Arc too.
Learn more about Events.
Example¶
Simple spinner¶
C code
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_scr_act(), 1000, 60);
lv_obj_set_size(spinner, 100, 100);
lv_obj_center(spinner);
}
#endif
# Create a spinner
spinner = lv.spinner(lv.scr_act(), 1000, 60)
spinner.set_size(100, 100)
spinner.center()