Assuming I've a scrollview with direction 1 (vertical). While populating the scrollView, the items do appear and are aligned from top to bottom.
I would like to know if there is a way to reverse this ordering i.e. to make the scrollView be populated from the bottom to the top. A good example of usage is a message list. You want the last message to always appear on the bottom of the list. By default, the message would be aligned on top, which is not convenient.
[EDIT] I just found we can easily set our own transform according to an offset overriding the outputFrom function callback. For example the following will invert the scroll content:
scrollview.outputFrom(function(offset)
{
return Transform.translate(0, -offset)
});
What you are looking for is unshift(). You can view the following code run at codefamo.us
Did it like you suggested, it works just fine while rotating all by 180˚. Example: http://jsfiddle.net/tamtamchik/LA49a/3/
Well as famo.us documentation says: "Scrollview will lay out a collection of renderables sequentially in the specified direction", so it will order the surfaces in the order you provide.
My advice is to add the surfaces to a list and then just add them to the ScrollView in reverse.