Repository navigation
Description
Hi everyone!
It's been a while since I've done significant work on this project and there are a number of bugs that have cropped up (#253, #242, #241, #238, #237, #228, #226, #220, #193, #184, #183, #172, #132, #95) that will require a lot of reworking. There are also some use cases I hadn't considered during my initial design that don't work well with the current structure. I'd also like to simplify and automate the testing process.
Part of this is that I'll be removing a lot of features and reducing the public interface of the class as much as possible. To help me figure out what I should keep and do better planning out improvements, please comment and let me know how you're using it. Here's the template I'd like to see. Please copy and paste this into a comment and complete it. See my example below.
### My use case (a few sentences describing it)
### Settings (choose the correct one in each [], first option is the default)
- setDeletionStyle([Clear, PartialCompletion, ToString])
- setTokenClickStyle([None, Delete, Select, SelectDeselect])
- allowDuplicates([true, false])
- performBestGuess([true, false])
- allowCollapse([true, false])
### API (delete all functions you do not use directly)
- setPrefix()
- setSplitChar()
- setTokenLimit()
- setTokenizer()
- setTokenListener()
- getObjects()
- addListeners()
- removeListeners()
- clearCompletionText()
- currentCompletionText()
- performCompletion()
- performCollapse()
- addObject()
- removeObject()
- clear()
### Behavior overrides (delete all functions you do not override)
- performFiltering()
- isTokenRemovable()
- maxTextWidth()
- enoughToFilter()
- buildSpanForObject()
- replaceText()
- getSerializableObjects()
- convertSerializableArrayToObjectArray()
- canDeleteSelection()
### Workarounds (any customization that is likely to break if I stop subclassing MultiAutoCompleteTextView)
### Feature requests (anything you currently do that the library could do for you)
Activity
mgod commentedon Jan 11, 2017
My use case (a few sentences describing it)
We use the library to allow the user to select a list of people when creating an expense. We load data from the the Android contacts provider and a local database of existing Splitwise friends.
Settings (choose the correct one in each [], first option is the default)
API (delete all functions you do not use directly)
Behavior overrides (delete all functions you do not override)
Workarounds (any customization that is likely to break if I stop subclassing MultiAutoCompleteTextView)
currentCompletionText()when the user types.Feature requests (anything you currently do that the library could do for you)
raylee4204 commentedon Jan 19, 2017
My use case
We use the library to allow the user to add hashtags to show their interests, and also select a list of people when sending them SMS messages. We load data from the API to pull suggested hashtags, and for SMS , from the Android contacts provider
Settings
setDeletionStyle(Clear)
setTokenClickStyle(None)
allowDuplicates(false)
performBestGuess(false)
allowCollapse(false)
API
setTokenListener()
getObjects()
addObject()
removeObject()
mgod commentedon Feb 8, 2017
@raylee4204 Thanks for the feedback! When you're getting the hashtags, is it just a list of hashtags or do you let the user enter other text as well like a Tweet editor?
raylee4204 commentedon Feb 8, 2017
@mgod I do accept regular texts along with hashtags.
biovolt commentedon Feb 22, 2017
My use case :
I use TokenAutoComplete to autocomplete a list of areas in my app using my own adapter that fetches the data from the server
Thank you for your contribution
Settings (choose the correct one in each [], first option is the default)
API (delete all functions you do not use directly)
Behavior overrides (delete all functions you do not override)
Workarounds (any customization that is likely to break if I stop subclassing MultiAutoCompleteTextView)
I am using our own class to create the tokens and swop the images to make it clear that they need to click to select and then delete
Feature requests (anything you currently do that the library could do for you
I would like to add a remove image to the token and add an onclick to the image so that they can remove the token with 1 click
setTokenClickStyle() - > remove image
mgod commentedon Jan 13, 2018
@biovolt Just to clarify for me, by "add a remove image" to the token, do you mean adding a separate area of the token that you can style that responds to selections differently than the main token body? I've been pretty hesitant to allow sub-token clicking both because it's hard and it feels like most tokens should be small enough that having separate click areas would be confusing for the user. I had intended TokenClickStyle.Delete for cases where you want to 1-click delete tokens as that felt like the more usable choice to me.
biovolt commentedon Jan 14, 2018
mgod commentedon Jul 8, 2018
I've just deleted some comments because this isn't a help thread. If you're not commenting about what features you currently use in the library, please look for a different thread to post in or create a new one. I usually respond fairly quickly to new issues unless they 1) are the same as an existing open issue (though I try to point to the current issue in this case) or 2) do not provide enough context for me to understand what's being asekd.
jrcacd commentedon Oct 9, 2018
When will be released the new version?
mgod commentedon Oct 24, 2018
I don't have a timeline for the next version. There is a
3.0.0-alphaversion you can get withimplementation 'com.splitwise:tokenautocomplete:3.0.0-alpha@aar'in your gradle dependencies, but I'm not quite done changing the interfaces I'm updating and there's no migration guide yet.jrcacd commentedon Oct 25, 2018
Thanks,
This is a must have library
mgod commentedon Nov 30, 2018
There's a version
3.0.0-alpha2available now. I don't expect the public interface to change at this point, but I'm still ironing out some edge case bugs.jrcacd commentedon Dec 3, 2018
Where's the .allowDuplicates(false) function?
mgod commentedon Dec 3, 2018
I'll hopefully get a migration guide together soon, but
is now (in your TokenCompleteTextView subclass):
with the correct substitution for
T.Krishnakantkhetan commentedon Jan 25, 2019
Existing Bug
If i add more than 100 email id's and performCollapse, the control gets stuck, it take a long time (more than 10 secs) to collapse.
My use case :
I use TokenAutoComplete to autocomplete a list of email id's copied from another source.
Feature requests:
I would like to have a paste option for bulk insertion at once. There should be addObjects() method to list of tokens.
mgod commentedon Mar 9, 2019
3.0.0is available now and the docs should be up to date. I believe I've addressed most of the requests here (please let me know how the free form text support works for you if you need it!).I've not added paste or bulk insert support. There's some ground work in place to make paste more reasonable to implement and
addObjectSyncshould be much less resource intensive in a loop than the currentaddObjectcode.I'm also not planning to support handling clicks on different pieces of the tokens. It's clear from looking at the underpinnings of the text layout that this problem is beyond the scope of what I can support in the library.