Bug 36911 - [Android] Cannot Remove Separator Line From A TableView
Summary: [Android] Cannot Remove Separator Line From A TableView
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-12-11 19:12 UTC by Jimmy [MSFT]
Modified: 2016-11-15 20:26 UTC (History)
6 users (show)

Tags: Android ac
Is this bug a regression?: ---
Last known good build:


Attachments
repro solution (62.59 KB, application/zip)
2015-12-11 19:12 UTC, Jimmy [MSFT]
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 NOT_ON_ROADMAP

Description Jimmy [MSFT] 2015-12-11 19:12:41 UTC
Created attachment 14254 [details]
repro solution

### Overview
On Android, trying to remove the separator lines between cells in a TableView with a custom renderer does not work. In the custom renderer, the line

> Control.DividerHeight = 0;

does not affect the separator line in the TableView.


### Steps to Reproduce
1. Run the attached Android project


### Expected Results
There are no separator lines between the items.


### Actual Results
The lines are still rendered even though DividerHeight is set to 0.


### Environment Info
=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 94ce5106-6a72-4691-b34e-cd5857b1db66
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.24.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.0.0 (Business Edition)
Hash: 7322991
Branch: master
Build date: 2015-12-08 16:20:29-0500

=== Xamarin.Android ===

Version: 6.0.0.34 (Business Edition)
Android SDK: /Users/jimmygarrido/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 22.0.1

Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.4.0.109 (Business Edition)

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.11.1
Darwin Jimmys-MacBook-Pro.local 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 1 Jimmy [MSFT] 2015-12-11 19:17:43 UTC
Craig mentioned in another report that this used to work before Forms 1.3: https://bugzilla.xamarin.com/show_bug.cgi?id=26656#c3

Bug #26104 is also similar to this, but they are using a custom cell renderer instead to remove the line from the section header only.
Comment 2 Mihail 2015-12-12 08:01:34 UTC
I am also able to reproduce the bug.
Comment 3 adamhewitt 2016-04-19 18:29:19 UTC
I'm also seeing this in 2.1. Looking at the decompiled TableViewModelRenderer, the GetView function adds a divider to the returned item rather than leveraging the divider/dividerHeight API of the Android ListView. Perhaps most importantly, it sets the background resource of the divider to a hard-coded value that the consumer (me) can't override.
Comment 4 Mike Rowley 2016-09-09 15:03:11 UTC
I am seeing this in 2.3.1.114 as well.

Xamarin any update or work around on this?
Comment 5 Mike Rowley 2016-09-10 17:34:57 UTC
Anyone else that is in need of a work around, its not ideal but the custom render code is in this forums post.

https://forums.xamarin.com/discussion/76380/seperator-lines-in-tableview
Comment 6 adrianknight89 2016-11-02 22:13:59 UTC
See https://github.com/xamarin/Xamarin.Forms/pull/500
Comment 7 Samantha Houts [MSFT] 2016-11-15 20:14:35 UTC
TableView is short term looking to be replaced by ListView which will grow to support all the features and niceties that TableView provides.
Comment 8 adrianknight89 2016-11-15 20:26:35 UTC
@Samantha, can you guys maybe create an FAQ on the repository homepage to communicate this kind of plans (it would help with anyone submitting or fixing bugs)? I think we need one. We also need a roadmap.