fix(comment): remove the space after /* and before */
This commit is contained in:
@@ -7,7 +7,7 @@ static lv_obj_t * kb;
|
||||
|
||||
void lv_example_textarea_2(void)
|
||||
{
|
||||
/* Create the password box */
|
||||
/*Create the password box*/
|
||||
lv_obj_t * pwd_ta = lv_textarea_create(lv_scr_act(), NULL);
|
||||
lv_textarea_set_text(pwd_ta, "");
|
||||
lv_textarea_set_password_mode(pwd_ta, true);
|
||||
@@ -16,33 +16,33 @@ void lv_example_textarea_2(void)
|
||||
lv_obj_set_pos(pwd_ta, 5, 20);
|
||||
lv_obj_add_event_cb(pwd_ta, ta_event_cb, NULL);
|
||||
|
||||
/* Create a label and position it above the text box */
|
||||
/*Create a label and position it above the text box*/
|
||||
lv_obj_t * pwd_label = lv_label_create(lv_scr_act(), NULL);
|
||||
lv_label_set_text(pwd_label, "Password:");
|
||||
lv_obj_align(pwd_label, pwd_ta, LV_ALIGN_OUT_TOP_LEFT, 0, 0);
|
||||
|
||||
/* Create the one-line mode text area */
|
||||
/*Create the one-line mode text area*/
|
||||
lv_obj_t * oneline_ta = lv_textarea_create(lv_scr_act(), pwd_ta);
|
||||
lv_textarea_set_password_mode(oneline_ta, false);
|
||||
lv_obj_align(oneline_ta, NULL, LV_ALIGN_IN_TOP_RIGHT, -5, 20);
|
||||
|
||||
|
||||
/* Create a label and position it above the text box */
|
||||
/*Create a label and position it above the text box*/
|
||||
lv_obj_t * oneline_label = lv_label_create(lv_scr_act(), NULL);
|
||||
lv_label_set_text(oneline_label, "Text:");
|
||||
lv_obj_align(oneline_label, oneline_ta, LV_ALIGN_OUT_TOP_LEFT, 0, 0);
|
||||
|
||||
/* Create a keyboard */
|
||||
/*Create a keyboard*/
|
||||
kb = lv_keyboard_create(lv_scr_act());
|
||||
lv_obj_set_size(kb, LV_HOR_RES, LV_VER_RES / 2);
|
||||
|
||||
lv_keyboard_set_textarea(kb, pwd_ta); /* Focus it on one of the text areas to start */
|
||||
lv_keyboard_set_textarea(kb, pwd_ta); /*Focus it on one of the text areas to start*/
|
||||
}
|
||||
|
||||
static void ta_event_cb(lv_obj_t * ta, lv_event_t event)
|
||||
{
|
||||
if(event == LV_EVENT_CLICKED) {
|
||||
/* Focus on the clicked text area */
|
||||
/*Focus on the clicked text area*/
|
||||
if(kb != NULL)
|
||||
lv_keyboard_set_textarea(kb, ta);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ static lv_obj_t * kb;
|
||||
*/
|
||||
void lv_example_textarea_3(void)
|
||||
{
|
||||
/* Create the text area */
|
||||
/*Create the text area*/
|
||||
lv_obj_t * ta = lv_textarea_create(lv_scr_act(), NULL);
|
||||
lv_obj_add_event_cb(ta, ta_event_cb, NULL);
|
||||
lv_textarea_set_accepted_chars(ta, "0123456789:");
|
||||
@@ -19,7 +19,7 @@ void lv_example_textarea_3(void)
|
||||
lv_textarea_set_one_line(ta, true);
|
||||
lv_textarea_set_text(ta, "");
|
||||
|
||||
/* Create a keyboard*/
|
||||
/*Create a keyboard*/
|
||||
kb = lv_keyboard_create(lv_scr_act());
|
||||
lv_obj_set_size(kb, LV_HOR_RES, LV_VER_RES / 2);
|
||||
lv_keyboard_set_mode(kb, LV_KEYBOARD_MODE_NUMBER);
|
||||
|
||||
Reference in New Issue
Block a user