[中文]

Spinner (lv_spinner)

Overview

The Spinner object 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 the Spinner.

See the events of the Arc too.

Learn more about Events.

Keys

No Keys are processed by the object type.

Learn more about Keys.

Example

[中文]

Simple spinner

#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

API

lv_spinner.h