Bug 27234 - ViewCell background conflicts with ListView Semi-Transparent and Transparent backgrounds
Summary: ViewCell background conflicts with ListView Semi-Transparent and Transparent ...
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-19 15:42 UTC by chaseqna
Modified: 2015-04-28 14:45 UTC (History)
11 users (show)

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

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:
VERIFIED FIXED

Description chaseqna 2015-02-19 15:42:38 UTC
ViewCell doubles the background color on a ListView with a semi-transparent BackgroundColor and if the ViewCell has ContextActions, it inserts a white background.  

I've attached a sample project showing the 6 variations between opaque, semi-transparent, transparent, and context actions.
Comment 8 Jiri Malina 2015-03-28 13:32:31 UTC
It seems that the error doesn't occur on API 19 devices but it does occur on API 21 devices.
Comment 9 Rui Marinho 2015-04-14 10:00:57 UTC
Should be fixed in 1.4.2-pre3
Comment 10 Rui Marinho 2015-04-14 10:03:58 UTC
Sorry correction 1.4.3-pre1
Comment 12 Cody Beyer (MSFT) 2015-04-22 17:10:26 UTC
Per customer:

When I select an item with ContextActions, the background is turned to white still.
Comment 13 Parmendra Kumar 2015-04-28 07:07:17 UTC
I have checked this issue with Xamarin.Forms 1.4.3-pre2 and observed that its working fine at my end.

Screencast: http://www.screencast.com/t/diHcsv0ydrLs

Hence closing this issue. 

If you getting same issue then please reopen the bug.
Comment 14 chaseqna 2015-04-28 11:37:07 UTC
I watched the screen cast and did not see you select and item in the ListViews with ContextActions.  The problem is that if you select an item with ContextActions it turns the ViewCell background white and ignores the SelectedBackgroundView.  If an item is without ContextActions, it works.  

Add the following ViewCellRenderer to the ListViewBackgroundWithContextActions.iOS project.  Please test again and compare selected items in ListViews with ContextActions vs the ones without.

[assembly: ExportRenderer(typeof(ViewCell), typeof(CustomViewCellRenderer))]

namespace ListViewBackgroundWithContextActions.iOS
{
	public class CustomViewCellRenderer:ViewCellRenderer
	{
		public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
		{
			var cell = base.GetCell(item, reusableCell, tv);

			cell.SelectedBackgroundView = new UIKit.UIView() { BackgroundColor = Color.FromHex("#465460").ToUIColor() };

			return cell;
		}
	}
}
Comment 15 Parmendra Kumar 2015-04-28 14:03:50 UTC
@chaseqna,  

I have again check this issue with attached sample in bug description and observed that if you select an item with ContextActions or without ContextActions it turns the ViewCell background white.

Please have a look the Screencast: http://www.screencast.com/t/USrAV2iH5cg

Xamarin.Forms 1.4.3-pre2
Comment 16 chaseqna 2015-04-28 14:14:54 UTC
@Parmendra.  If you add the the ViewCellRenderer I suggested, you would see that the ones without ContextActions show a green SelectedBackgroundView.  The ones with ContextActions show white.
Comment 17 Parmendra Kumar 2015-04-28 14:26:20 UTC
Thanks @chaseqna,

Could you please provide me a sample project? So that I can reproduce this issue as per comment #16.

Thanks
Comment 18 chaseqna 2015-04-28 14:34:20 UTC
All you have to do is add what I suggested in comment#14, but I'm working with Cody to get this filed separately.  The sample project was above the size limit.
Comment 19 Cody Beyer (MSFT) 2015-04-28 14:39:59 UTC
New bug will be put in for newly discovered scenario
Comment 20 Parmendra Kumar 2015-04-28 14:45:01 UTC
Thanks @Cody,

As per comment #19, I am going to verify this issue.