Bug 35781 - Android Seperator in ListView is always visible
Summary: Android Seperator in ListView is always visible
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.5.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-11 07:46 UTC by Caan Mee
Modified: 2017-09-01 02:22 UTC (History)
5 users (show)

Tags: ac, listview, android
Is this bug a regression?: ---
Last known good build:


Attachments
Screenshot (11.67 KB, image/png)
2015-11-11 07:46 UTC, Caan Mee
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Caan Mee 2015-11-11 07:46:15 UTC
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).


Reproduce:

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;
        }
    }
Comment 1 Caan Mee 2015-11-11 07:46:36 UTC
Created attachment 13775 [details]
Screenshot
Comment 2 John Hardman 2016-08-24 16:56:56 UTC
Still an issue in 2.3.0.107
Comment 3 John Hardman 2016-09-01 10:17:18 UTC
I see this on both Android and iOS (but not UWP).
Comment 4 adrianknight89 2016-09-24 04:44:43 UTC
I don't see this problem in 2.3.3.152-pre2 (at least on Android). Can you re-test?
Comment 5 David Ortinau [MSFT] 2017-09-01 02:22:11 UTC
Confirmed this is working as expected in 2.4.0-pre2