chore(format) add formatting for examples & demos, merge test config
This commit is contained in:
@@ -28,9 +28,10 @@ void lv_example_textarea_1(void)
|
||||
lv_obj_add_state(ta, LV_STATE_FOCUSED); /*To be sure the cursor is visible*/
|
||||
|
||||
static const char * btnm_map[] = {"1", "2", "3", "\n",
|
||||
"4", "5", "6", "\n",
|
||||
"7", "8", "9", "\n",
|
||||
LV_SYMBOL_BACKSPACE, "0", LV_SYMBOL_NEW_LINE, ""};
|
||||
"4", "5", "6", "\n",
|
||||
"7", "8", "9", "\n",
|
||||
LV_SYMBOL_BACKSPACE, "0", LV_SYMBOL_NEW_LINE, ""
|
||||
};
|
||||
|
||||
lv_obj_t * btnm = lv_btnmatrix_create(lv_scr_act());
|
||||
lv_obj_set_size(btnm, 200, 150);
|
||||
|
||||
@@ -31,9 +31,8 @@ static void ta_event_cb(lv_event_t * e)
|
||||
lv_obj_t * ta = lv_event_get_target(e);
|
||||
const char * txt = lv_textarea_get_text(ta);
|
||||
if(txt[0] >= '0' && txt[0] <= '9' &&
|
||||
txt[1] >= '0' && txt[1] <= '9' &&
|
||||
txt[2] != ':')
|
||||
{
|
||||
txt[1] >= '0' && txt[1] <= '9' &&
|
||||
txt[2] != ':') {
|
||||
lv_textarea_set_cursor_pos(ta, 2);
|
||||
lv_textarea_add_char(ta, ':');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user