Description
What MCU/Processor/Board and compiler are you using?
STM32F407,LVGL8.2,NXP GUIDER
What do you want to achieve?
Move the List one step down or up in lvgl8.2, as in previous versions of lv_list_down(List);
What have you tried so far?
lv_obj_clear_flag(ui->screen_test_disp_list_1_item2, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
lv_group_focus_obj(ui->screen_test_disp_list_1_item2);
#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"
void setup_scr_screen_test_disp(lv_ui *ui)
{
//Write codes screen_test_disp
ui->screen_test_disp = lv_obj_create(NULL);
lv_obj_set_size(ui->screen_test_disp, 320, 240);
lv_obj_set_scrollbar_mode(ui->screen_test_disp, LV_SCROLLBAR_MODE_OFF);
//Write style for screen_test_disp, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_test_disp, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_test_disp, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_test_disp, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes screen_test_disp_list_1
ui->screen_test_disp_list_1 = lv_list_create(ui->screen_test_disp);
ui->screen_test_disp_list_1_item0 = lv_list_add_btn(ui->screen_test_disp_list_1, LV_SYMBOL_SAVE, "save");
ui->screen_test_disp_list_1_item1 = lv_list_add_btn(ui->screen_test_disp_list_1, LV_SYMBOL_SAVE, "save_1");
ui->screen_test_disp_list_1_item2 = lv_list_add_btn(ui->screen_test_disp_list_1, LV_SYMBOL_SAVE, "save_2");
ui->screen_test_disp_list_1_item3 = lv_list_add_btn(ui->screen_test_disp_list_1, LV_SYMBOL_SAVE, "save_3");
lv_obj_set_pos(ui->screen_test_disp_list_1, 80, 70);
lv_obj_set_size(ui->screen_test_disp_list_1, 160, 127);
lv_obj_set_scrollbar_mode(ui->screen_test_disp_list_1, LV_SCROLLBAR_MODE_OFF);
lv_obj_clear_flag(ui->screen_test_disp_list_1_item2, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
lv_group_focus_obj(ui->screen_test_disp_list_1_item1);
//Update current screen layout.
lv_obj_update_layout(ui->screen_test_disp);
}