Closed KazysNoobiys closed 2 years ago
There is a cool trick that works pretty well, I called it the double 180 trick.
First you add a rotatex=180 on your cells, then you add another rotatex=180 to the CollectionView itself and boom 🤯
Le mar. 24 mai 2022 à 09:37, KazysNoobiys @.***> a écrit :
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.
— Reply to this email directly, view it on GitHub https://github.com/roubachof/Sharpnado.CollectionView/issues/67, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERXJYAPLEIWOVOFERPUSDVLSBKFANCNFSM5WYRW62A . You are receiving this because you are subscribed to this thread.Message ID: @.***>
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;
}
}
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.