显示
lv_obj_clear_flag(uiobj, LV_OBJ_FLAG_HIDDEN);
隐藏
lv_obj_add_flag(uiobj, LV_OBJ_FLAG_HIDDEN);
左右滑动:
LV_EVENT_GESTURE LV_DIR_LEFT LV_DIR_RIGHT
if(event_code == LV_EVENT_GESTURE && lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_BOTTOM) {
lv_indev_wait_release(lv_indev_get_act());
Screen_Down(e);
}
if(event_code == LV_EVENT_GESTURE && lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_TOP) {
lv_indev_wait_release(lv_indev_get_act());
Screen_Up(e);
}
透明度:
lv_obj_set_style_bg_opa(ui_area, 200, LV_PART_MAIN | LV_STATE_DEFAULT);
对于父组件居中
lv_obj_align(cui_Image3, LV_ALIGN_CENTER, 0, 0);
pad 0 设置。
lv_obj_set_style_pad_left(cui_screenMedicine, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(cui_screenMedicine, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_pad_top(cui_screenMedicine, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_pad_bottom(cui_screenMedicine, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
设置居中要点
lv_obj_set_width(ui_Screen, LV_SIZE_CONTENT); /// 宽度第二个参数设置成LV_SIZE_CONTENT
lv_obj_set_height(ui_Screen, LV_SIZE_CONTENT); /// 1