Closed NikolayKul closed 6 years ago
At the moment, this isn't supported by the library. Can you give me some more details on your use case?
I have something similar to your example with emails. I also want to allow users edit those emails wapped into Tokens. So when a user clicks on a Token the latter should replace itself with a simple text it contains. I tried to achieve that this way:
TokenClickStyle.SelectDeselect
TextView
with a cb on setSelected
currentCompletionText
at the end. But all Tokens are grouped together at the start of the view.
At the moment, tokens are inserted asynchronously on the main thread, which is probably what's causing trouble for you. I'm intending to change this behavior in the next version, but I'm still in the middle of re-working the view for that and I'm not sure when that will be ready. I'm not planning to add a replace object method at the moment, but it's probably something I'd consider.
I do something similar in the Splitwise app and the approach that I took was to remove the object, show an alert to edit the information, then add the new object when the user finished editing. This doesn't keep the order intact, but seems to work pretty well. Editing in place does seem more elegant.
All tokens are added one by one at the start of the view. How can I add a token after text?