I ran in a weird bug with TokenCompleteTextView.onRestoreInstanceState() and so ended up not wanting to use the restored objects in onRestoreInstanceState (we have the state in our viewmodel. However the even though I'm not using the prefix the setPrefix() in onRestoreInstanceState() the would clear the tokens I had already set in the TokenCompleteTextView in my activities onCreate(). Specifically when it called setText().
To resolve I've added the prefixEnabled property. This allows callers to disable the prefix behaviour and solve the issue I was seeing. However, there maybe an alternate way to solve this that doesn't involve and extra property. Open to suggestions.
Also, apologies for the additional formatting changes it seems my code formatter got carried away. I can correct this if there's approval for this PR to the merged.
I ran in a weird bug with
TokenCompleteTextView.onRestoreInstanceState()
and so ended up not wanting to use the restored objects in onRestoreInstanceState (we have the state in our viewmodel. However the even though I'm not using the prefix thesetPrefix()
inonRestoreInstanceState()
the would clear the tokens I had already set in the TokenCompleteTextView in my activitiesonCreate()
. Specifically when it calledsetText()
.To resolve I've added the
prefixEnabled
property. This allows callers to disable the prefix behaviour and solve the issue I was seeing. However, there maybe an alternate way to solve this that doesn't involve and extra property. Open to suggestions.Also, apologies for the additional formatting changes it seems my code formatter got carried away. I can correct this if there's approval for this PR to the merged.