I have a ListView in Android where all cells have different Colors.
When I set the SeparatorVisibility to "None" there is still a seperator between the cells (1px), which has the color of the Background (red in the screenshot).
Is there no way on Android to remove the seperator completly?
public class App : Application
{
public App()
{
var listview = new ListView
{
SeparatorColor = Color.Transparent,
SeparatorVisibility = SeparatorVisibility.None,
ItemsSource = new List<Color> { Color.Black, Color.Blue, Color.Green, Color.White },
ItemTemplate = new DataTemplate(() => this.GetViewCell())
};
this.MainPage = new ContentPage
{
Content =
new StackLayout
{
BackgroundColor = Color.Red,
VerticalOptions = LayoutOptions.FillAndExpand,
Children = { listview }
}
};
}
private ViewCell GetViewCell()
{
var layout = new StackLayout();
layout.SetBinding(VisualElement.BackgroundColorProperty, ".");
var viewCell = new ViewCell { Height = 300, View = layout };
return viewCell;
}
}