From 35d845b36034d6d05dd2a97b3b0c98a30a3fefe0 Mon Sep 17 00:00:00 2001 From: 100ask <48745717+100ask@users.noreply.github.com> Date: Tue, 2 Aug 2022 23:38:18 +0800 Subject: [PATCH] fix(ime_pinyin): fix the problem that lv_ime_pinyin is not hidden together with the keyboard (#3540) In fact, the use of lv_ime_pinyin does not need to use the lv_ime_pinyin object itself, so we decided to hide it to avoid some other unnecessary problems. --- src/others/ime/lv_ime_pinyin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/others/ime/lv_ime_pinyin.c b/src/others/ime/lv_ime_pinyin.c index 8ae077c98..90715b95a 100644 --- a/src/others/ime/lv_ime_pinyin.c +++ b/src/others/ime/lv_ime_pinyin.c @@ -562,8 +562,7 @@ static void lv_ime_pinyin_constructor(const lv_obj_class_t * class_p, lv_obj_t * lv_memzero(pinyin_ime->py_num, sizeof(pinyin_ime->py_num)); lv_memzero(pinyin_ime->py_pos, sizeof(pinyin_ime->py_pos)); - lv_obj_set_size(obj, LV_PCT(100), LV_PCT(55)); - lv_obj_align(obj, LV_ALIGN_BOTTOM_MID, 0, 0); + lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN); #if LV_IME_PINYIN_USE_DEFAULT_DICT init_pinyin_dict(obj, lv_ime_pinyin_def_dict); @@ -1197,4 +1196,4 @@ static void pinyin_k9_cand_page_proc(lv_obj_t * obj, uint16_t dir) #endif /*LV_IME_PINYIN_USE_K9_MODE*/ -#endif /*LV_USE_IME_PINYIN*/ \ No newline at end of file +#endif /*LV_USE_IME_PINYIN*/