On Saturday, October 1, 2016 at 4:23:00 AM UTC+3, Shai Almog wrote:
>
> try textField.stopEditing()
>

On an android 7 phone in landscape orientation, if I touch TextArea, I get 
a fullscreen soft keyboard. When I press done on the keyboard, the edit 
area that is embedded in the keyboard overlay disappears, but the keyboard 
itself does not. If I at this point flip the device to get into portrait, 
the soft keyboard does not disappear like it normally does when changing 
orientation, but stays on, now showing my form in the top half of the 
screen. Typing with this phantom soft keyboard will not add text anywhere. 
clicking on the text area makes the keyboard functional again - pressing 
back key hides the keyboard. The soft keyboard in question is the Android 
AOSP keyboard, so should be pretty standard on many devices.

I believe the keyboard should hide when pressing done in landscape mode; I 
can not get it to hide even when trying to make a custom TextField that 
certainly does its best to make sure soft keyboard is hidden after done:

public class TextEdit extends TextField {
Form result;
TextEdit(Form f) {
Display.getInstance().setShowDuringEditBehavior(Display.SHOW_DURING_EDIT_ALLOW_SAVE);
result = f;
setSingleLineTextArea(false);
addActionListener(al -> {
            stopEditing();
            Display.getInstance().setShowVirtualKeyboard(false);
            result.revalidate();
            result.show();
});
setDoneListener(dl -> {
            stopEditing();
            Display.getInstance().setShowVirtualKeyboard(false);
            result.revalidate();
            result.show();
});
}
}
 

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/d761c1a3-1a67-48c5-9f64-e34d13886705%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to