Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how does TokenClickStyle.Select work with IME delete? #253

Closed
webleydev opened this issue Sep 8, 2016 · 3 comments
Closed

how does TokenClickStyle.Select work with IME delete? #253

webleydev opened this issue Sep 8, 2016 · 3 comments

Comments

@webleydev
Copy link

I'm not sure this is an issue, it could be I'm just missing something obvious. But here goes.

TokenClickStyle.Select works the way I expect, one touch = select, one more touch = delete, touching unselected tokens shifts selection to said token.

However, while touching IME delete works similarly, I cannot get it to set the token to selected state. One press on del APPEARS to do SOMETHING, and one more deletes the token. But without the selected state being set, the highlighting I do for that first touch does not appear on the first IME delete press. I tried to track down what's happening but I can't figure it out.

Basically, I need some help finding out what happens, and where, when TokenClickStyle is set to Select, and IME delete is pressed for the first time.

I should add I'm allowing collapsable to be true, and I do realize the behaviors are different between setting focus to the TokenAutoCompleteTextView when it is collapsed, and when it is not. Specifically, the last token seems to delete on first touch of IME delete when the view was not collapsed before gaining focus. But again, I'm not sure what behavior is supposed to be in the first place. I could not get the code to break on anything on that first touch of IME delete.

@mgod
Copy link
Contributor

mgod commented Sep 8, 2016

You're not missing anything – IME behavior with the library is really inconsistent. I've never been able to figure it out because it seems to vary based on Android OS and device. When you're seeing the first press do something (and not remove the token as it does on some other platforms), you're most likely seeing it delete the space after the token.

You will also see on some platforms that selecting the token, then hitting the delete key will delete the selected token and not the one just before the cursor. On others it will just delete the preceding token.

@webleydev
Copy link
Author

Wow. Thanks for letting me know. This makes it even more interesting that IME del takes only one touch when TokenClickStyle is Delete. (In my Android/Device combo of course)

Device specific stuff is insane. I have a bug in my app only on s7/edge that breaks audio playback completely for the whole device and requires restart. Its ridiculous. I guess I'll have to work around that problem rather than finding a specific fix there too.

@mgod
Copy link
Contributor

mgod commented Mar 9, 2019

I've updated some of these behaviors in 3.0.0, but I'm pretty sure I didn't actually resolve the issue. Please let me know if you're still seeing this with the update.

@mgod mgod closed this as completed Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants