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.
Example¶
C¶
Simple spinner¶
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_scr_act(), 1000, 60);
lv_obj_set_size(spinner, 100, 100);
lv_obj_center(spinner);
}
#endif