eyeem / chips-android

Chips EditText widget for android
90 stars 24 forks source link

Can't type any texts after a chip made with Multi Language text #13

Closed wonsuc closed 9 years ago

wonsuc commented 9 years ago

image

(Sorry with poor english)

First, love eyeem app, and I liked the classy tag system on eyeem. So I choose this library for my SNS App Project. And I'm just investigating every codes in this library and it is such a great library, I think.

So, the issue what I want point out is this. Since Instagram and other sns apps are supporting Multi Language Tag, I also wanted use Multi Language Tag with this library, but there's some error with it. There's no problem with process of making chip with Korean characters, but after made chip, I can't type any texts after the chip. Please check the image, and it is not showing "White Space" after the chip (It should be showing). And if I dismiss the keyboard and re touch edittext, it show "White Space", and the cursor is at correct position, I can type texts normally.

I don't know what is the real problem, but thinking it is about different measure between Korean.length() and setSelection()? or another...

Thanks!

Device: Nexus 5 OS Version: Lollipop (API 21)

wonsuc commented 9 years ago

It seems it is only problem with Korean Language. I tested several languages on eyeem app. But only Korean problem. I will let you know if I resolve this issue.

wonsuc commented 9 years ago

It was very easy. Just this simple method will resolve this issue.

In the "endManualMode()" function of ChipsEditText class.

setText(getText()); // <- Put this line before "setSelections()" function calls.
setSelection(getText().length());

Maybe Korean character system wants to holding the cursor till one complete character made up, and it cause this error I think. I wish u to patch this issue to eyeem app! Thanks :)

vishna commented 9 years ago

First off, thanks for the report and glad you've found this library useful. I will try to investigate this issue this week - need to test if your fix doesn't break anything for us. Cheers!