2021-04-08 13:07:48 +02:00
|
|
|
#include "../../lv_examples.h"
|
2021-02-14 14:56:34 +01:00
|
|
|
#if LV_USE_IMG && LV_BUILD_EXAMPLES
|
2021-02-08 09:53:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
void lv_example_img_1(void)
|
|
|
|
{
|
2021-02-19 18:19:32 +01:00
|
|
|
LV_IMG_DECLARE(img_cogwheel_argb);
|
2021-03-25 13:36:50 +01:00
|
|
|
lv_obj_t * img1 = lv_img_create(lv_scr_act());
|
2021-02-08 09:53:03 +01:00
|
|
|
lv_img_set_src(img1, &img_cogwheel_argb);
|
2021-03-25 16:14:17 +01:00
|
|
|
lv_obj_align(img1, LV_ALIGN_CENTER, 0, -20);
|
2021-02-19 18:42:20 +01:00
|
|
|
lv_obj_set_size(img1, 200, 200);
|
2021-02-08 09:53:03 +01:00
|
|
|
|
2021-03-25 13:36:50 +01:00
|
|
|
lv_obj_t * img2 = lv_img_create(lv_scr_act());
|
2021-02-08 09:53:03 +01:00
|
|
|
lv_img_set_src(img2, LV_SYMBOL_OK "Accept");
|
2021-03-25 16:14:17 +01:00
|
|
|
lv_obj_align_to(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
|
2021-02-08 09:53:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|