romainpiel / Shimmer-android

(DEPRECATED) An Android TextView with a shimmering effect
2k stars 438 forks source link

LinearGradient cache/postInvalidateOnAnimation #3

Closed eveliotc closed 10 years ago

eveliotc commented 10 years ago

Just my ¢2

romainpiel commented 10 years ago

Hey

Yes I know the linear gradient thing was going to be an issue at some point. I didn't think of LRU caching, nice one.

Thanks for your comments I'll work on that asap.

romainpiel commented 10 years ago

@eveliotc regarding the LRU cache,

romainpiel commented 10 years ago

Actually I have a better idea. I can reproduce this effect with a single shader

eveliotc commented 10 years ago

@RomainPiel yeah they are immutable; as I remember you can't translate/zoom the canvas as they are anchored to the window but they do have a local Matrix you could try modifying it (resize and translate)

Pretty sure someone will go crazy and use it in an AdapterView then complain about jank

romainpiel commented 10 years ago

Yep I just got it working with a single linear gradient and playing with the local matrix. I'm cleaning it up and will submit an update later on.

eveliotc commented 10 years ago

:+1:

romainpiel commented 10 years ago

fixed in version 1.1.0