0

I have a simple text entry field. When I click on it soft keyboard appears and it occupies the most of the screen, blocking the entry field. So I can not see what input I'm typing. What can I do to make it visible along with soft keyboard or at least show the word that is being typed?

Code:

   tab = elm_table_add(win);
   evas_object_size_hint_weight_set(tab , EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, tab);

   Evas_Object *entry;
   entry = elm_entry_add(tab);
   elm_entry_entry_set(entry, "test");
   //EXPAND THE ENTRY.
   evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(entry);
   elm_table_pack(tab, entry, 1, 0, 1, 1);

How to move entry along with the soft keyboard?

Rifat
  • 1,700
  • 3
  • 20
  • 51

1 Answers1

1

Try using Elm.Conformant. This helps to resize the screen when using a virtual keyboard.

See the example below.

This is also included in Tiizen Studio BasicUI template.

Evas_Object *win = elm_win_util_standard_add(NULL, NULL);
Evas_Object *conform = elm_conformant_add(win, conform);
elm_win_resize_object_add(win, conform);
Evas_Object *layout = elm_layout_add(conform);
elm_object_content_set(conform, layout);
wonrst
  • 46
  • 1
  • Thanks for the answer. I need to add the entry on a background (elm_bg) object. So I tried to add th conformant on different objects such as naviframe, box, bg, but the app crashes. Should I add the conformant on a different object and will it work? – Rifat Apr 20 '20 at 15:42
  • Have someone figure this out? The input entry shows up in the middle of the screen and the keyboard covers it. I am deploying in a Galaxy Watch Active 2. – jiko Jul 26 '21 at 16:57