[Feature Request] Reverse CollectionView layout
KazysNoobiys opened this issue · 5 comments
I am making an application which has a chat room, for the chat need that the items would appear from the bottom up in a vertical list. Is it possible to add this functionality? Or at least tell me where to start. If for android it seems to be done simply, but for ios it looks like a difficult problem.
It looks cool! Thank you so much! Does this method have any hidden problems?
I already used this trick and I didn't find any issues so far:
Really cool! Thanks for the response!
Hmm hmm. I tried this method. On ios, at first glance, everything works correctly. But on android there is a problem with scrolling. In the end for android I decided to use the native way and for ios I used a double 180 degree rotation.
Android:
public class ChatCollectionViewRenderer : CollectionViewRenderer
{
public ChatCollectionViewRenderer(Context context) : base(context)
{
}
protected override LayoutManager SelectLayoutManager(IItemsLayout layoutSpecification)
{
var layoutManager = base.SelectLayoutManager(layoutSpecification);
if (layoutManager is LinearLayoutManager linearLayoutManager)
{
linearLayoutManager.ReverseLayout = true;
}
return layoutManager;
}
}