mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
19 lines
528 B
C
19 lines
528 B
C
|
#include "../../../lvgl.h"
|
||
|
#if LV_USE_IMG
|
||
|
|
||
|
/* Find the image here: https://github.com/lvgl/lv_examples/tree/master/assets */
|
||
|
LV_IMG_DECLARE(img_cogwheel_argb);
|
||
|
|
||
|
void lv_example_img_1(void)
|
||
|
{
|
||
|
lv_obj_t * img1 = lv_img_create(lv_scr_act(), NULL);
|
||
|
lv_img_set_src(img1, &img_cogwheel_argb);
|
||
|
lv_obj_align(img1, NULL, LV_ALIGN_CENTER, 0, -20);
|
||
|
|
||
|
lv_obj_t * img2 = lv_img_create(lv_scr_act(), NULL);
|
||
|
lv_img_set_src(img2, LV_SYMBOL_OK "Accept");
|
||
|
lv_obj_align(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
|
||
|
}
|
||
|
|
||
|
#endif
|