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
Added method to set the character that triggers token creation #34
Conversation
@wdullaer The pull request is correct. Unfortunately, there are a couple of issue with the patch. I've hardcoded I also use I suspect getting this all correct for the general case is going to be harder than it's worth and you may want to just get the subset of behaviors you need working in your case, though I strongly urge you to test for weird interactions on 2.3.3, 4.0, 4.2.2. If you do want to get a more comprehensive version working, I would look at factoring out some of the behavior into an |
…ng custom splitChars.
Hi, I've refined my patch a bit. I have also added a custom Tokenizer class. It borrows most of its code from the CommaTokenizer, but you can configure the token characters in the same way as the splitCharacters. It should behave identical to CommaTokenizer. I haven't run into any major issues so far, then again, I haven't really done any extensive testing yet. It would be cool if you could take another look and let me know if you like the way I'm going with this and if you would eventually consider merging it. (If not, I'll probably just test for my personal use cases and call it a day). |
Removed unused method clear()
Updated gradle settings to suppor the latest version of android studio
@wdullaer This is exactly what I had in mind. There are a few tweaks I'll want to make, so I'll probably merge this when I have some spare cycles to work on the code. |
Great news. Your library saved me a lot of work, so I'm happy I could contribute back. I'm also going to see if I can trigger the token creation when the view loses focus (gmail does this). If you can describe what you'd want changed in my implementation (maybe with some short comments on the code), I could try to implement those for you. |
Conflicts: library/src/main/java/com/tokenautocomplete/TokenCompleteTextView.java
|
crashes the app onLongClick |
Is there any chance that this pull request will ever be merged? Most of the issues I have fixed are still present in the current version. I recently started working ont this library again to fix a few niggles I had with it. If there is no more chance that my changes can be merged here, I'm going to change the code structure. The current one makes it hard to maintain for me. |
@wdullaer I'm going to commit to merging this week. I'm sorry for the super slow process on this one. |
Also, if the structure changes are not project-specific, I'd love to hear about what you're having trouble with. |
Hi Marshall, |
I've created a new pull request #90 |
I wanted the EditTextView to create tokens when the user inputs a space, so I removed the hardcoded comparison with ',' and added some convenience methods to set the character that triggers token creation.
It is possible to set multiple characters.
The code can be shorter by using a List instead of an array of chars, but given that char is a primitive I think the current approach is less resource intensive.
I hope I did this pull request thing right, I'm quite new to GitHub