lvgl 9键的键盘 看示例没有写 需要怎么改

lvgl 9键的键盘 看示例没有写 需要怎么改

void lv_100ask_pinyin_ime_simple_test(void)
{
    lv_obj_t * pinyin_ime = lv_100ask_pinyin_ime_create(lv_scr_act());
    lv_obj_set_style_text_font(pinyin_ime, &lv_font_source_han_sans_normal_16, 0);   // set font
    //lv_100ask_pinyin_ime_set_dict(pinyin_ime, your_dict); // Use a custom thesaurus. If it is not set, the built-in thesaurus will be used

    lv_obj_t * kb = lv_100ask_pinyin_ime_get_kb(pinyin_ime);

    /* ta1 */
    lv_obj_t * ta1 = lv_textarea_create(lv_scr_act());
    lv_obj_set_style_text_font(ta1, &lv_font_source_han_sans_normal_16, 0);   // set font
    lv_obj_align(ta1, LV_ALIGN_TOP_LEFT, 10, 10);

    lv_keyboard_set_textarea(kb, ta1);

    lv_obj_add_event_cb(ta1, ta_event_cb, LV_EVENT_ALL, kb);

    /* ta2 */
    lv_obj_t * ta2 = lv_textarea_create(lv_scr_act());
    lv_obj_set_style_text_font(ta2, &lv_font_source_han_sans_normal_16, 0);   // set font
    lv_obj_align_to(ta2, ta1,LV_ALIGN_OUT_RIGHT_MID, 10, 0);

    lv_obj_add_event_cb(ta2, ta_event_cb, LV_EVENT_ALL, kb);
}

https://lvgl.100ask.net/master/details/other-components/ime_pinyin.html#pinyin-ime-9-key-input