Android Question Facebook Shimmer effect for Android

Greg Breinholt

Member
Licensed User
Longtime User
Looks like the only issue is that the lines are not always at the same angle when the views are not square. Below is an icon and 2 lines, as used in a typical CustomListView. I made the lines red so that they are visible (usually they would light). As the views are not all square, the angle of the lines are different (which does not make it look as good as I'd like). This looks like some editing of the CoolLogo class to keep the angle the same over different views :-(




Alternatively, I could dynamically draw all three grey shapes in a single bitmap, and then I think the CoolLogo class would handle it fine ;-)
 
Upvote 0

Greg Breinholt

Member
Licensed User
Longtime User
Thanks again Erel!

Yes, that got them looking similar, but as the lines don't move synchronized across the 3 shapes, I think I will still have go go for the alternative solution:
> Alternatively, I could dynamically draw all three grey shapes in a single bitmap, and then I think the CoolLogo class would handle it fine ;-)
 
Upvote 0

Greg Breinholt

Member
Licensed User
Longtime User
In the end, to get the best performance, I used a single PNG (attached), and used basic animation to move it over the content ;-)
Note that the image is hard to see, as it's a white gradient with varying transparency - so I added a magenta back to make it easier to see below.




Note that there are 2 images above; a white one to the right of the magenta block!
 
Last edited:
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Can you post your solution, please? If I understand well, this way the "flash line" will cover all the rectangle, not only the text (and logo).
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
he just move the image from left to right. his background is probably white so it's (the overlay) not visible on none text portions of the screen.
 
Upvote 0

Greg Breinholt

Member
Licensed User
Longtime User
he just move the image from left to right. his background is probably white so it's (the overlay) not visible on none text portions of the screen.
Yes, that's exactly right. With a white background, no issue to have this as a moving overlay.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…