TextField setSingleLineTextArea voiding constraint on Android

17 views
Skip to first unread message

Jean-Michel 06

unread,
Mar 4, 2015, 11:53:14 AM3/4/15
to codenameone...@googlegroups.com
Hello,
 
I am experiencing a problem on Android device using the TextField.
I expect the keyboard to capitalize the first letter of each sentence setting the constraint INITIAL_CAPS_SENTENCE.
But this fails when I add setSingleLineTextArea(false) and user needs to touch the shift key.
 
This problem is also affecting TextArea.
 
noteTextField = new TextField();
noteTextField
.setConstraint(TextField.ANY | TextField.INITIAL_CAPS_SENTENCE);
noteTextField
.setInputMode("Abc");
noteTextField
.setSingleLineTextArea(false); // Either not capital first letter or single line if true
noteTextField
.setGrowByContent(true);
noteTextField
.setRows(16);
 


This behavior happens on a Sumsung S2  Android 4.1.2

Thank you




 
 

Shai Almog

unread,
Mar 5, 2015, 12:19:59 AM3/5/15
to codenameone...@googlegroups.com
Hi,
that's a limitation of devices. Most of the constraint values are only applicable when using a single line and don't have an equivalent in multi-line editing.
This is really an issue in UITextField and UITextView difference on iOS etc.
Reply all
Reply to author
Forward
0 new messages