splitwise / TokenAutoComplete

Gmail style MultiAutoCompleteTextView for Android
Apache License 2.0
1.3k stars 383 forks source link

Token does not align to the left automatically after adding multiple spaces #259

Closed SMavr closed 8 years ago

SMavr commented 8 years ago

If the user adds multiple spaces and then selects a token, the token is created in the place of the cursor and not in the left as it should be.

screenshot_20160930-165519 1
mgod commented 8 years ago

I think this is working as intended, unfortunately. There are a number of people who use this library to do a combination of free text entry and tokenizing, so I can't really make assumptions about removing content like this. You can probably prevent this behavior by not using " " as a split character. I'm assuming you've done this as it's the only way I've been able to reproduce it.

SMavr commented 8 years ago

But Gmail has also this kind of behavior and it allows the user to enter free text without preventing hit to enter empty spaces as well. Could you add a boolean to enable this kind of behavior (To trim the empty spaces between the added tokens)?

mgod commented 8 years ago

No, the library is already very challenging to test and I don't want to add another set of paths I need to validate. It feel like not using " " as a split character will solve the issue and your use case doesn't look like it should be using " " anyways. Have you tried disabling that or did I mis-diagnose the initial issue?

SMavr commented 8 years ago

Maybe you misunderstood the issue. I am not using the " " as a split character. What I did was to hit spacebar multiple times and then I selected one token from the autosuggestion list. So what I would expect is that the token would be created at the left side of the token view and not in the position that the cursor was right before adding it.