Samsung Galaxy Player, 9000 Character limit in EditText

MichaelAust

Member
Licensed User
Longtime User
I have written an app which loads text files in an EditText for editing, one of which is 21k in size. It works fine in the emulator, but on the Galaxy Player the file is truncated in the EditText. The file size is 21223, I load it into a string TempStr, and TempStr.length is 21223, then I do NoteEditText.Text=TempStr, and NoteEditText.length is 9000. (on the emulator it is 21223).

I did some googling and found a couple of forum threads mentioning this happening on other Samsung devices,
android - Limited edittext on some samsung devices? - Stack Overflow
and
Android EditText unlimited text length - Stack Overflow
Both threads have posts by the same user saying to set android:maxLength="a large number" in your layout file.

So the question is, is it possible to do the same thing in Basic4Android, and if so, how do I do it ? I tried adding this line in the manifest editor because the lines in there look similar, but it didn't work.

Is there a way to do it ?
 

MichaelAust

Member
Licensed User
Longtime User
Thank you for the reply,
Yes it does need to be editable. Does that mean I cannot use the
android:maxLength="a large number"
approach ?
How would a CustomListView work ?
edit: Do you mean have a series of EditTexts in CustomListView cells ?
 
Last edited:
Upvote 0

MichaelAust

Member
Licensed User
Longtime User
Try the attached IME library. You should call IME.SetLengthFilter.

Fantastic ! Works like a charm, Tnank you very much.

This should be very heplful to anyone who has to load more than 9000 characters into an EditText and whose app may run on older Samsung devices, eg Galaxy s2, Galaxy Player, possibly other Galaxy S devices.
 
Upvote 0
Top