Android Question CR/LF in edittext?

RVP

Active Member
Licensed User
Longtime User
Edit text support multilines, but it seems just but wrapping? How do I allow users to do a hard line end, and go to a new line?
 

stevel05

Expert
Licensed User
Longtime User
If you set the EditText's SingleLine field in the designer to False or
B4X:
EditText1.SingleLine = False
in code, the keyboard should display a return key which will allow the user to go to a new line.
 
Upvote 0

RVP

Active Member
Licensed User
Longtime User
I have set my keyboard to have a done key and that seems to replace the Return key. Is it possible to have both? Or if you have return, does the user need to use the devices back key to exit the keyboard?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
As LucaMS suggested you could add a button to the layout to close the keyboard, unless you can define a condition upon which it should close, number of lines added or similar, then use the IME library to close the keyboard from the button or condition.

You could try managing the visibility of the close button with the FocusChanged method on the edittext.
 
Upvote 0

James Chamblin

Active Member
Licensed User
Longtime User
On my Galaxy S3, when using multiline, I just press the back key to exit the keyboard when I'm finished typing. I'd assume that all Android phones worked the same.
 
Upvote 0
Top