Spinner (lv_spinner)
Overview
The Spinner Widget is a spinning arc over a ring.
Parts and Styles
The parts are identical to the parts of Arc (lv_arc).
Usage
Create a spinner
To create a spinner use lv_spinner_create(parent).
Using lv_spinner_set_anim_params(spinner, spin_duration, angle) the duration of one revolution and the length of he arc can be customized.
Events
No special events are sent to Spinner Widgets.
Further Reading
Learn more about Base-Widget Events emitted by all Widgets.
Learn more about Events.
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