Closed spung closed 6 years ago
Probably not. The token size is a little variable depending on the size fo the TokenCompleteTextView
. There's no intrinsic size for the tokens (I'm assuming you're seeing tiny tokens with the view correctly wrapping them?), so there's not really a way to have the parent warp around them.
Thanks for the quick reply. Any thoughts on workarounds to get the clicks propagating to the parent view when there's no token there?
I would probably set visibility to GONE
until you needed it, but you could probably also use a touch or click listener on the edit text to forward events to your underlying view.
Visibility won't work because I want this to happen when tokens are present. E.g. one token is displayed, any clicks to the right of it should go to the parent view. I'll investigate the second approach. If you think of anything else please let me know, thanks!
Ah, I misunderstood what you meant by "no token there". You meant that when the user clicks on the whitespace to the right of all the tokens, you want that click to go through, not just different behavior when there are 0 total tokens. This isn't possible as far as I know. #99 has some more discussion that might be helpful.
Hi, I am trying to use
wrap_content
for the width of my class which extendsTokenCompleteTextView
but this does not render correctly. I'd like for the width to wrap around the tokens present, so that any clicks to the right of the tokens will go to the underlying/parent layout. Is this possible?