glide-support icon indicating copy to clipboard operation
glide-support copied to clipboard

Invalidate doesn't work, even in the UI thread.

Open baoanhng opened this issue 8 years ago • 1 comments

I got this work by changing targetView.invalidate(), but somehow the images overlapped letters in Textview. Not sure why it happened.

It seems to be a strange behavior of Html.ImageGetter, will try.

After attempting for a while, setText(getText()) will mess up the layout. Invalidate() does not work.

baoanhng avatar Jun 12 '17 09:06 baoanhng

Found a way. Instead of invalidate Textview with setText, do setTextSize. It is less verbose and work better. My attempt is

textView.setTextSize(n + 1);
textView.setTextSize(initialSize);

That way you will force the textView to invalidate with new textsize, and then set textsize back to normal.

Generally, you have to change a property of textview in order to call invalidate. Hope to help someone.

baoanhng avatar Jun 12 '17 11:06 baoanhng

Sorry, didn't mean to close this, I just renamed the base branch.

It's still on my todo list to investigate: https://github.com/TWiStErRob/glide-support/issues/48

TWiStErRob avatar Mar 04 '23 17:03 TWiStErRob