splitwise / TokenAutoComplete

Gmail style MultiAutoCompleteTextView for Android
Apache License 2.0
1.3k stars 384 forks source link

Don't hook into invalidate() to trigger redrawing spans #408

Closed cketti closed 3 years ago

cketti commented 3 years ago

invalidate() often triggers additional invalidate() calls and it's easy to get into an endless loop or do too much work. Doing additional work in invalidate() is also the cause of a crash when cutting all text (#335).

Instead of using an implementation detail of TextView to trigger redrawing the spans we now add or remove an invisible dummy span to achieve the same result. This is unlikely to break in the future.

Fixes #335

cketti commented 3 years ago

@mgod: Any chance you can release a new beta version including this fix?

digitals85 commented 10 months ago

bump on the request for a new version, currently hitting some crashes due to this.

@mgod do you have any plans to release an updated version that includes this fix?

mgod commented 10 months ago

I believe 4.0.0-beta5 includes this fix? I've been debating archiving this library, so I'm not sure if we'll get to a full 4.0.0 release, but the beta should be stable. As I've been re-working the system for 4.0.0, I've been unable to find any reliable solution to dealing with the wide variety of keyboards available that all have different behaviors and ignore requested settings flags as they please. I'm still hoping I can find a solution or a more complete re-work to use the Google Chips components or something similar to avoid this issue.

digitals85 commented 10 months ago

I believe 4.0.0-beta5 includes this fix? I've been debating archiving this library, so I'm not sure if we'll get to a full 4.0.0 release, but the beta should be stable. As I've been re-working the system for 4.0.0, I've been unable to find any reliable solution to dealing with the wide variety of keyboards available that all have different behaviors and ignore requested settings flags as they please. I'm still hoping I can find a solution or a more complete re-work to use the Google Chips components or something similar to avoid this issue.

How does one acquire the beta 05? Should I just rename the version in the depedencies file like so:

'com.splitwise:tokenautocomplete:4.0.0-beta05@aar'

mgod commented 10 months ago

Yes, that should do it.