Android Question Limit the number of lines in a word wrapped multi-line edit text.

SJQ

Member
Licensed User
Longtime User
Does anybody know a way to limit the number of lines in a multi-line edit text?

I don’t mean limit the number of characters I know how to do that.

I also know how to limit lines based on CRLF… What I mean is, by Word Wrap and by Carriage Return.

I want to stop the end user from adding text outside of the initial visible area, I don’t want the text box to scroll and allow the user to add more text once they reach the initial bottom of the edit text input area.

The reason is, one of our customers has ‘clients’ who add quite a bit of text to an edit text as part of feedback on services (quite opinionated too), using a touch screen kiosk type app.

Some ‘people’ have decided to add additional abusive comments out of sight, that only gets discovered after they have left the terminal and we have been asked to make a modification to the app, to stop people adding more than the displayed text box.

They don’t want users to continue adding text after say 20 lines, irrespective of the character count and width of the text box.

Does anybody have any ideas?
 

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
Some websites I've seen implement this simply by preventing the textbox from accepting enter forcing the customer to enter everything as one paragraph basically. For a quick comment box I don't see this method as being a problem.
 
Upvote 0

SJQ

Member
Licensed User
Longtime User
I've thought about that, removing the Carriage Returns, but that won't stop them filling the box with writing, word wrap will still take the text greater than the boundary of the edit text and they could just do the same again.
 
Upvote 0

SJQ

Member
Licensed User
Longtime User
Thanks, Erel, I'll have look at that, Is there a way to disable the text boxes ability to scroll?
 
Upvote 0
Top