Dear all,
Is there any way to apply transition effect on the tableView’s rows?
When showing rows, I want the rows coming one by one with a litte bit fade-in effect; it might not be efficient, but certainly looks cool.
Any suggestion?
Cheers,
Jimmy
Dear all,
Is there any way to apply transition effect on the tableView’s rows?
When showing rows, I want the rows coming one by one with a litte bit fade-in effect; it might not be efficient, but certainly looks cool.
Any suggestion?
Cheers,
Jimmy
Hi Jimmy,
This isn’t built in, and it’s rather a “special case” that would need to be added in the open-sourced widget code. You’re welcome to tinker with it, here:
https://github.com/coronalabs/framework-widgets
Brent
Hi Jimmy,
This isn’t built in, and it’s rather a “special case” that would need to be added in the open-sourced widget code. You’re welcome to tinker with it, here:
https://github.com/coronalabs/framework-widgets
Brent
I just played around with this. At the top of onRowRender do this:
[lua]
local row = event.row
row.alpha = 0
[/lua]
Now put everything you need into your row and as the last line of the onRowRender routine, add this:
[lua]
transition.to ( row, {time=1000, alpha=1} )
[/lua]
I didn’t play around with whether it affects the “working” of the list, but the rows do fade in as they come on the screen. It appears at least a couple rows are rendered off the bottom of the screen, so if you scroll slowly they will have already faded in by the time they come into view, but scroll a little faster and you can see the fade in.
That might be a starting point for you to work with.
Jay
I just played around with this. At the top of onRowRender do this:
[lua]
local row = event.row
row.alpha = 0
[/lua]
Now put everything you need into your row and as the last line of the onRowRender routine, add this:
[lua]
transition.to ( row, {time=1000, alpha=1} )
[/lua]
I didn’t play around with whether it affects the “working” of the list, but the rows do fade in as they come on the screen. It appears at least a couple rows are rendered off the bottom of the screen, so if you scroll slowly they will have already faded in by the time they come into view, but scroll a little faster and you can see the fade in.
That might be a starting point for you to work with.
Jay