Search code examples
androidsamsung-mobile

Limited edittext on some samsung devices?


I am trying to read a long text from the sdcard to an edittext in Android. On almost all devices this works very well, except for some samsung devices. When I try to read anything over 10kb the string I read it too gets the whole file. When I try to add this to the edittext its cut off at 10kb. Even if I put it in a loop trying to add a little bit at the time with append it still doesn't add more than 10kb.

On every phone I have tried this works, on HTCs, Sony Ericssons, the nexus phones, but none of the Galaxy S... phone can do it.

Has this happened to anyone else? Is there a workaround?


Solution

  • 10 minutes after posting this question for the 20th time on the web without any answers I find it myself!

    In your layout file, in the EditText, add android:maxLength="some high value" and it works!

    Interesting that most other devices don't come with a limit while some Samsung phones does for the edittext!