/* * Copyright 2025 NXP * NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in * accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing, * activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to * comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license * terms, then you may not retain, install, activate or otherwise use the software. */ #include "lvgl.h" #include #include "gui_guider.h" #include "events_init.h" #include "widgets_init.h" #include "custom.h" void setup_scr_firstinfopage(lv_ui *ui) { //Write codes firstinfopage ui->firstinfopage = lv_obj_create(NULL); lv_obj_set_size(ui->firstinfopage, 480, 480); lv_obj_set_scrollbar_mode(ui->firstinfopage, LV_SCROLLBAR_MODE_OFF); //Write style for firstinfopage, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->firstinfopage, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->firstinfopage, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->firstinfopage, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes firstinfopage_returnbg ui->firstinfopage_returnbg = lv_img_create(ui->firstinfopage); lv_obj_add_flag(ui->firstinfopage_returnbg, LV_OBJ_FLAG_CLICKABLE); lv_img_set_src(ui->firstinfopage_returnbg, LVGL_PATH(returnbg.png)); lv_img_set_pivot(ui->firstinfopage_returnbg, 50,50); lv_img_set_angle(ui->firstinfopage_returnbg, 0); lv_obj_set_pos(ui->firstinfopage_returnbg, 23, 27); lv_obj_set_size(ui->firstinfopage_returnbg, 14, 26); //Write style for firstinfopage_returnbg, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_img_opa(ui->firstinfopage_returnbg, 255, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes firstinfopage_retrunbtn ui->firstinfopage_retrunbtn = lv_btn_create(ui->firstinfopage); //ui->firstinfopage_retrunbtn_label = lv_label_create(ui->firstinfopage_retrunbtn); //lv_label_set_text(ui->firstinfopage_retrunbtn_label, ""); //lv_label_set_long_mode(ui->firstinfopage_retrunbtn_label, LV_LABEL_LONG_WRAP); //lv_obj_align(ui->firstinfopage_retrunbtn_label, LV_ALIGN_CENTER, 0, 0); lv_obj_set_style_pad_all(ui->firstinfopage_retrunbtn, 0, LV_STATE_DEFAULT); //lv_obj_set_width(ui->firstinfopage_retrunbtn_label, LV_PCT(100)); lv_obj_set_pos(ui->firstinfopage_retrunbtn, 8, 8); lv_obj_set_size(ui->firstinfopage_retrunbtn, 60, 60); //Write style for firstinfopage_retrunbtn, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->firstinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->firstinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->firstinfopage_retrunbtn, 5, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->firstinfopage_retrunbtn, 0, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_text_color(ui->firstinfopage_retrunbtn, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_text_font(ui->firstinfopage_retrunbtn, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_text_opa(ui->firstinfopage_retrunbtn, 255, LV_PART_MAIN|LV_STATE_DEFAULT); // lv_obj_set_style_text_align(ui->firstinfopage_retrunbtn, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes firstinfopage_label_1 ui->firstinfopage_label_1 = lv_label_create(ui->firstinfopage); //lv_label_set_text(ui->firstinfopage_label_1, "First screen"); lv_label_set_text(ui->firstinfopage_label_1,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_SetFirstScreen]); lv_label_set_long_mode(ui->firstinfopage_label_1, LV_LABEL_LONG_DOT); lv_obj_set_pos(ui->firstinfopage_label_1, 46, 32); lv_obj_set_size(ui->firstinfopage_label_1, 200, 20); //Write style for firstinfopage_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_border_width(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui->firstinfopage_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui->firstinfopage_label_1, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui->firstinfopage_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_letter_space(ui->firstinfopage_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_line_space(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_text_align(ui->firstinfopage_label_1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(ui->firstinfopage_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_color(ui->firstinfopage_label_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_bg_grad_dir(ui->firstinfopage_label_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_shadow_width(ui->firstinfopage_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes firstinfopage_label_2 ui->firstinfopage_label_2 = lv_label_create(ui->firstinfopage); lv_obj_set_pos(ui->firstinfopage_label_2, 40, 80); lv_obj_set_size(ui->firstinfopage_label_2, 400, 32); // lv_label_set_text(ui->firstinfopage_label_2, "Please select Home Mode"); lv_label_set_text(ui->firstinfopage_label_2,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_HomeMode]); lv_label_set_long_mode(ui->firstinfopage_label_2, LV_LABEL_LONG_WRAP); lv_obj_set_style_text_align(ui->firstinfopage_label_2, LV_TEXT_ALIGN_CENTER, 0); //Write style state: LV_STATE_DEFAULT for style_firstinfopage_label_2_main_main_default static lv_style_t style_firstinfopage_label_2_main_main_default; lv_style_reset(&style_firstinfopage_label_2_main_main_default); lv_style_set_radius(&style_firstinfopage_label_2_main_main_default, 0); lv_style_set_bg_color(&style_firstinfopage_label_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6)); lv_style_set_bg_grad_color(&style_firstinfopage_label_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6)); lv_style_set_bg_grad_dir(&style_firstinfopage_label_2_main_main_default, LV_GRAD_DIR_VER); lv_style_set_bg_opa(&style_firstinfopage_label_2_main_main_default, 0); lv_style_set_text_color(&style_firstinfopage_label_2_main_main_default, lv_color_make(0xff, 0xff, 0xff)); lv_style_set_text_font(&style_firstinfopage_label_2_main_main_default, &lv_font_simsun_16); lv_style_set_text_letter_space(&style_firstinfopage_label_2_main_main_default, 0); lv_style_set_pad_left(&style_firstinfopage_label_2_main_main_default, 0); lv_style_set_pad_right(&style_firstinfopage_label_2_main_main_default, 0); lv_style_set_pad_top(&style_firstinfopage_label_2_main_main_default, 0); lv_style_set_pad_bottom(&style_firstinfopage_label_2_main_main_default, 0); lv_obj_add_style(ui->firstinfopage_label_2, &style_firstinfopage_label_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); //The custom code of firstinfopage. //Write codes firstinfopage_cont_1 ui->firstinfopage_cont_1 = lv_obj_create(ui->firstinfopage); lv_obj_set_pos(ui->firstinfopage_cont_1, 40, 140); lv_obj_set_size(ui->firstinfopage_cont_1, 400, 240); //Write style state: LV_STATE_DEFAULT for style_firstinfopage_cont_1_main_main_default static lv_style_t style_firstinfopage_cont_1_main_main_default; lv_style_reset(&style_firstinfopage_cont_1_main_main_default); lv_style_set_radius(&style_firstinfopage_cont_1_main_main_default, 15); lv_style_set_bg_color(&style_firstinfopage_cont_1_main_main_default, lv_color_make(0x26, 0x26, 0x26)); lv_style_set_bg_grad_color(&style_firstinfopage_cont_1_main_main_default, lv_color_make(0x26, 0x26, 0x26)); lv_style_set_bg_grad_dir(&style_firstinfopage_cont_1_main_main_default, LV_GRAD_DIR_VER); lv_style_set_bg_opa(&style_firstinfopage_cont_1_main_main_default, 255); lv_style_set_border_color(&style_firstinfopage_cont_1_main_main_default, lv_color_make(0x26, 0x26, 0x26)); lv_style_set_border_width(&style_firstinfopage_cont_1_main_main_default, 0); lv_style_set_border_opa(&style_firstinfopage_cont_1_main_main_default, 255); lv_style_set_pad_left(&style_firstinfopage_cont_1_main_main_default, 0); lv_style_set_pad_right(&style_firstinfopage_cont_1_main_main_default, 0); lv_style_set_pad_top(&style_firstinfopage_cont_1_main_main_default, 0); lv_style_set_pad_bottom(&style_firstinfopage_cont_1_main_main_default, 0); lv_obj_add_style(ui->firstinfopage_cont_1, &style_firstinfopage_cont_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes firstinfopage_label_3 ui->firstinfopage_label_3 = lv_label_create(ui->firstinfopage_cont_1); lv_obj_set_pos(ui->firstinfopage_label_3, 20, 189); lv_obj_set_size(ui->firstinfopage_label_3, 180, 24); // lv_label_set_text(ui->firstinfopage_label_3, "Clock + switch"); lv_label_set_text(ui->firstinfopage_label_3,Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_Clockswitch]); lv_label_set_long_mode(ui->firstinfopage_label_3, LV_LABEL_LONG_WRAP); lv_obj_set_style_text_align(ui->firstinfopage_label_3, LV_TEXT_ALIGN_CENTER, 0); //Write style state: LV_STATE_DEFAULT for style_firstinfopage_label_3_main_main_default static lv_style_t style_firstinfopage_label_3_main_main_default; lv_style_reset(&style_firstinfopage_label_3_main_main_default); lv_style_set_radius(&style_firstinfopage_label_3_main_main_default, 0); lv_style_set_bg_color(&style_firstinfopage_label_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6)); lv_style_set_bg_grad_color(&style_firstinfopage_label_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6)); lv_style_set_bg_grad_dir(&style_firstinfopage_label_3_main_main_default, LV_GRAD_DIR_VER); lv_style_set_bg_opa(&style_firstinfopage_label_3_main_main_default, 0); lv_style_set_text_color(&style_firstinfopage_label_3_main_main_default, lv_color_make(0xff, 0xff, 0xff)); lv_style_set_text_font(&style_firstinfopage_label_3_main_main_default, &lv_font_simsun_16); lv_style_set_text_letter_space(&style_firstinfopage_label_3_main_main_default, 2); lv_style_set_pad_left(&style_firstinfopage_label_3_main_main_default, 0); lv_style_set_pad_right(&style_firstinfopage_label_3_main_main_default, 0); lv_style_set_pad_top(&style_firstinfopage_label_3_main_main_default, 0); lv_style_set_pad_bottom(&style_firstinfopage_label_3_main_main_default, 0); lv_obj_add_style(ui->firstinfopage_label_3, &style_firstinfopage_label_3_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes firstinfopage_label_4 ui->firstinfopage_label_4 = lv_label_create(ui->firstinfopage_cont_1); lv_obj_set_pos(ui->firstinfopage_label_4, 247, 189); lv_obj_set_size(ui->firstinfopage_label_4, 100, 24); lv_label_set_text(ui->firstinfopage_label_4, Menu_List[GET_nvs_Sys_Info_language()][MENU_LIST_Switch]); lv_label_set_long_mode(ui->firstinfopage_label_4, LV_LABEL_LONG_WRAP); lv_obj_set_style_text_align(ui->firstinfopage_label_4, LV_TEXT_ALIGN_CENTER, 0); //Write style state: LV_STATE_DEFAULT for style_firstinfopage_label_4_main_main_default static lv_style_t style_firstinfopage_label_4_main_main_default; lv_style_reset(&style_firstinfopage_label_4_main_main_default); lv_style_set_radius(&style_firstinfopage_label_4_main_main_default, 0); lv_style_set_bg_color(&style_firstinfopage_label_4_main_main_default, lv_color_make(0x21, 0x95, 0xf6)); lv_style_set_bg_grad_color(&style_firstinfopage_label_4_main_main_default, lv_color_make(0x21, 0x95, 0xf6)); lv_style_set_bg_grad_dir(&style_firstinfopage_label_4_main_main_default, LV_GRAD_DIR_VER); lv_style_set_bg_opa(&style_firstinfopage_label_4_main_main_default, 0); lv_style_set_text_color(&style_firstinfopage_label_4_main_main_default, lv_color_make(0xff, 0xff, 0xff)); lv_style_set_text_font(&style_firstinfopage_label_4_main_main_default, &lv_font_simsun_16); lv_style_set_text_letter_space(&style_firstinfopage_label_4_main_main_default, 2); lv_style_set_pad_left(&style_firstinfopage_label_4_main_main_default, 0); lv_style_set_pad_right(&style_firstinfopage_label_4_main_main_default, 0); lv_style_set_pad_top(&style_firstinfopage_label_4_main_main_default, 0); lv_style_set_pad_bottom(&style_firstinfopage_label_4_main_main_default, 0); lv_obj_add_style(ui->firstinfopage_label_4, &style_firstinfopage_label_4_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes firstinfopage_img_2 ui->firstinfopage_img_2 = lv_img_create(ui->firstinfopage_cont_1); lv_obj_set_pos(ui->firstinfopage_img_2, 177, 102); lv_obj_set_size(ui->firstinfopage_img_2, 45, 10); //Write style state: LV_STATE_DEFAULT for style_firstinfopage_img_2_main_main_default static lv_style_t style_firstinfopage_img_2_main_main_default; lv_style_reset(&style_firstinfopage_img_2_main_main_default); lv_style_set_img_recolor(&style_firstinfopage_img_2_main_main_default, lv_color_make(0xff, 0xff, 0xff)); lv_style_set_img_recolor_opa(&style_firstinfopage_img_2_main_main_default, 0); lv_style_set_img_opa(&style_firstinfopage_img_2_main_main_default, 255); lv_obj_add_style(ui->firstinfopage_img_2, &style_firstinfopage_img_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_add_flag(ui->firstinfopage_img_2, LV_OBJ_FLAG_CLICKABLE); lv_img_set_src(ui->firstinfopage_img_2,LVGL_PATH(firstdateswitchicon.png)); lv_img_set_pivot(ui->firstinfopage_img_2, 0,0); lv_img_set_angle(ui->firstinfopage_img_2, 0); //Write codes firstinfopage_imgbtn_2 ui->firstinfopage_imgbtn_2 = lv_imgbtn_create(ui->firstinfopage_cont_1); lv_obj_set_pos(ui->firstinfopage_imgbtn_2, 240, 58); lv_obj_set_size(ui->firstinfopage_imgbtn_2, 108, 108); //Write style state: LV_STATE_DEFAULT for style_firstinfopage_imgbtn_2_main_main_default static lv_style_t style_firstinfopage_imgbtn_2_main_main_default; lv_style_reset(&style_firstinfopage_imgbtn_2_main_main_default); lv_style_set_text_color(&style_firstinfopage_imgbtn_2_main_main_default, lv_color_make(0x00, 0x00, 0x00)); lv_style_set_img_recolor(&style_firstinfopage_imgbtn_2_main_main_default, lv_color_make(0xff, 0xff, 0xff)); lv_style_set_img_recolor_opa(&style_firstinfopage_imgbtn_2_main_main_default, 0); lv_style_set_img_opa(&style_firstinfopage_imgbtn_2_main_main_default, 255); lv_obj_add_style(ui->firstinfopage_imgbtn_2, &style_firstinfopage_imgbtn_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style state: LV_STATE_PRESSED for style_firstinfopage_imgbtn_2_main_main_pressed static lv_style_t style_firstinfopage_imgbtn_2_main_main_pressed; lv_style_reset(&style_firstinfopage_imgbtn_2_main_main_pressed); lv_style_set_text_color(&style_firstinfopage_imgbtn_2_main_main_pressed, lv_color_make(0xFF, 0x33, 0xFF)); lv_style_set_img_recolor(&style_firstinfopage_imgbtn_2_main_main_pressed, lv_color_make(0x00, 0x00, 0x00)); lv_style_set_img_recolor_opa(&style_firstinfopage_imgbtn_2_main_main_pressed, 0); lv_obj_add_style(ui->firstinfopage_imgbtn_2, &style_firstinfopage_imgbtn_2_main_main_pressed, LV_PART_MAIN|LV_STATE_PRESSED); //Write style state: LV_STATE_CHECKED for style_firstinfopage_imgbtn_2_main_main_checked static lv_style_t style_firstinfopage_imgbtn_2_main_main_checked; lv_style_reset(&style_firstinfopage_imgbtn_2_main_main_checked); lv_style_set_text_color(&style_firstinfopage_imgbtn_2_main_main_checked, lv_color_make(0xFF, 0x33, 0xFF)); lv_style_set_img_recolor(&style_firstinfopage_imgbtn_2_main_main_checked, lv_color_make(0x00, 0x00, 0x00)); lv_style_set_img_recolor_opa(&style_firstinfopage_imgbtn_2_main_main_checked, 0); lv_obj_add_style(ui->firstinfopage_imgbtn_2, &style_firstinfopage_imgbtn_2_main_main_checked, LV_PART_MAIN|LV_STATE_CHECKED); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_2, LV_IMGBTN_STATE_RELEASED, NULL, LVGL_PATH(firstswitchbgnew.png), NULL); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_2, LV_IMGBTN_STATE_PRESSED, NULL, LVGL_PATH(firstswitchbgnew.png), NULL); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_2, LV_IMGBTN_STATE_CHECKED_RELEASED, NULL, LVGL_PATH(firstswitchbgnew.png), NULL); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_2, LV_IMGBTN_STATE_CHECKED_PRESSED, NULL, LVGL_PATH(firstswitchbgnew.png), NULL); lv_obj_add_flag(ui->firstinfopage_imgbtn_2, LV_OBJ_FLAG_CHECKABLE); //Write codes firstinfopage_imgbtn_1 ui->firstinfopage_imgbtn_1 = lv_imgbtn_create(ui->firstinfopage_cont_1); lv_obj_set_pos(ui->firstinfopage_imgbtn_1, 52, 56); lv_obj_set_size(ui->firstinfopage_imgbtn_1, 108, 108); //Write style state: LV_STATE_DEFAULT for style_firstinfopage_imgbtn_1_main_main_default static lv_style_t style_firstinfopage_imgbtn_1_main_main_default; lv_style_reset(&style_firstinfopage_imgbtn_1_main_main_default); lv_style_set_text_color(&style_firstinfopage_imgbtn_1_main_main_default, lv_color_make(0x00, 0x00, 0x00)); lv_style_set_img_recolor(&style_firstinfopage_imgbtn_1_main_main_default, lv_color_make(0xff, 0xff, 0xff)); lv_style_set_img_recolor_opa(&style_firstinfopage_imgbtn_1_main_main_default, 0); lv_style_set_img_opa(&style_firstinfopage_imgbtn_1_main_main_default, 255); lv_obj_add_style(ui->firstinfopage_imgbtn_1, &style_firstinfopage_imgbtn_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); //Write style state: LV_STATE_PRESSED for style_firstinfopage_imgbtn_1_main_main_pressed static lv_style_t style_firstinfopage_imgbtn_1_main_main_pressed; lv_style_reset(&style_firstinfopage_imgbtn_1_main_main_pressed); lv_style_set_text_color(&style_firstinfopage_imgbtn_1_main_main_pressed, lv_color_make(0xFF, 0x33, 0xFF)); lv_style_set_img_recolor(&style_firstinfopage_imgbtn_1_main_main_pressed, lv_color_make(0x00, 0x00, 0x00)); lv_style_set_img_recolor_opa(&style_firstinfopage_imgbtn_1_main_main_pressed, 0); lv_obj_add_style(ui->firstinfopage_imgbtn_1, &style_firstinfopage_imgbtn_1_main_main_pressed, LV_PART_MAIN|LV_STATE_PRESSED); //Write style state: LV_STATE_CHECKED for style_firstinfopage_imgbtn_1_main_main_checked static lv_style_t style_firstinfopage_imgbtn_1_main_main_checked; lv_style_reset(&style_firstinfopage_imgbtn_1_main_main_checked); lv_style_set_text_color(&style_firstinfopage_imgbtn_1_main_main_checked, lv_color_make(0xFF, 0x33, 0xFF)); lv_style_set_img_recolor(&style_firstinfopage_imgbtn_1_main_main_checked, lv_color_make(0x00, 0x00, 0x00)); lv_style_set_img_recolor_opa(&style_firstinfopage_imgbtn_1_main_main_checked, 0); lv_obj_add_style(ui->firstinfopage_imgbtn_1, &style_firstinfopage_imgbtn_1_main_main_checked, LV_PART_MAIN|LV_STATE_CHECKED); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_1, LV_IMGBTN_STATE_RELEASED, NULL, LVGL_PATH(firstdatebgnew.png), NULL); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_1, LV_IMGBTN_STATE_PRESSED, NULL, LVGL_PATH(firstdatebgnew.png), NULL); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_1, LV_IMGBTN_STATE_CHECKED_RELEASED, NULL, LVGL_PATH(firstdatebgnew.png), NULL); lv_imgbtn_set_src(ui->firstinfopage_imgbtn_1, LV_IMGBTN_STATE_CHECKED_PRESSED, NULL, LVGL_PATH(firstdatebgnew.png), NULL); lv_obj_add_flag(ui->firstinfopage_imgbtn_1, LV_OBJ_FLAG_CHECKABLE); //Update current screen layout. lv_obj_update_layout(ui->firstinfopage); //Init events for screen. events_init_firstinfopage(ui); }