Closed ntyrrell closed 8 years ago
Rather than setting your own OnEditorActionListener
, override onEditorAction
in your TokenCompleteTextView
subclass – most likely your listener is getting removed by the one in the library and there's some order that changes when the activity resumes.
Hi,
Thank you for the response. However, I've moved the listener over to the subclass, and still no luck.
It doesn't appear to be an issue with OnEditorActionListener. Any other ideas as to what could be causing the issue?
Good morning,
I'm loving this widget thus far, although I am coming up against some unusual behaviour that I'm not fully understanding.
I have two views in a fragment that hold tags (in my case, skills and interests). I also wanted to add the functionality of adding new tags on hitting the return key as well as the delimiting characters. These are then saved to the local database after clicking a save button. The code below is added during the onCreateView method of the fragment.
However, having gone through the debugger, it appears that onTokenAdded and onTokenRemoved do not fire if it is the first time that the fragment is viewed. On the other hand, if the application is hidden from view (i.e. the phone goes into standby mode or another application is brought up), these methods will fire as expected.
Any advice/guidance as to why these views are behaving this way would be greatly appreciated.
Kind regards,
Nicholas