Bug 33450 - [iOS] Cell with ContextAction has a different layout
Summary: [iOS] Cell with ContextAction has a different layout
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Rui Marinho
URL:
Depends on:
Blocks:
 
Reported: 2015-08-28 04:46 UTC by Michael Rumpler
Modified: 2017-05-25 17:41 UTC (History)
7 users (show)

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


Attachments
sample project (309.83 KB, application/x-zip-compressed)
2015-08-28 04:46 UTC, Michael Rumpler
Details
screenshot of the sample app demonstrating the bug (76.85 KB, image/png)
2015-08-28 04:49 UTC, Michael Rumpler
Details
sample project which sets SeparatorInset and LayoutMargins (154.88 KB, application/x-zip-compressed)
2016-02-13 11:52 UTC, Michael Rumpler
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 Michael Rumpler 2015-08-28 04:46:49 UTC
Created attachment 12670 [details]
sample project

If a Cell has a ContextAction, then it also has less horizontal padding than other cells in the same ListView. The separator between the cells has also a different length (even if the custom renderer sets SeparatorInset and LayoutMargins to UIEdgeInsets.Zero).
This can easily be seen if a ListView contains cells with and without ContextAction. The attached solution does exactly that. It displays 10 cells where every other cell has a ContextAction. The sample uses a ImageCell, but the same can be seen with a ViewCell too.

I also observed that on WinPhone 8.0 SL the text of the ContextAction is in lowercase letters. It should be "Delete" but displays "delete". On Android, the text is all uppercase which could be seen as platform standard (although I never saw such a menu before), but all lowercase is definitely a bug.

Tested in Xamarin.Forms 1.3.3 and 1.5.0.6404-pre3 on iOS, Android and WinPhone 8.0 Silverlight. Did not test on WinRT as this is not included in the "Blank App (Xamarin.Forms Portable)" template.
Comment 1 Michael Rumpler 2015-08-28 04:49:41 UTC
Created attachment 12671 [details]
screenshot of the sample app demonstrating the bug
Comment 2 Paul DiPietro [MSFT] 2015-08-28 12:29:13 UTC
This is occurring on iOS while using 1.5.0.6404-pre3.
Comment 3 Rui Marinho 2015-10-27 11:40:54 UTC
Should be fixed in 1.5.2-pre2
Comment 4 Michael Rumpler 2016-02-13 11:50:52 UTC
I tried with 1.5.2.6477-pre2 and 2.1.0.6513-pre4. The image and text are indeed aligned correctly. However, the separator line is not.

I tried to circumvent this with an Effect/renderer which sets the UITableViews and UITableViewCells SeparatorInset and LayoutMargins to UIEdgeInsets.Zero, but that had no effect on the separator line of the cells with ContextAction and now the image and text are also not aligned correctly anymore.
Comment 5 Michael Rumpler 2016-02-13 11:52:02 UTC
Created attachment 15033 [details]
sample project which sets SeparatorInset and LayoutMargins
Comment 6 Jimmy [MSFT] 2017-01-10 23:49:06 UTC
I can still reproduce this issue with Forms 2.3.3 using the repro project in comment 5. As mentioned in comment 4, the ImageView alignment is fixed but the separator line on context action cells is still indented. 

This seems to only affect ImageCells however as a TextCell with context actions does not experience this issue.
Comment 7 Rui Marinho 2017-05-25 17:41:29 UTC
This is fixed on 2.3.4 stable