I'm using listview to display the list of items. The items are getting listed based on their date. If there are multiple events in a day I need to remove the space between the events and hide the date for the items other than the first one. Now I'm hiding the date using the day visibility variable using the following code:
foreach (var eventshb in eventsHBList)
{
bool isFirstItem = true;
foreach (var events in eventshb.eventsList)
{
if (isFirstItem)
{
eventshb.dayVisibility = true;
isFirstItem = false;
}
else
{
eventshb.dayVisibility = false;
}
eventshb.eventsListTO = events;
EventAllItems.Add(eventshb);
}
}
I'm trying to remove the empty space between the items. For refers, I have added the current UI and the required UI Screenshots.
The demo project using the listview for displaying the events is uploaded in the drive.