Bug 23908 - Switch Control not rendering in Grid in selected Tabbed page on Samsung Android devices until device is rotated.
Summary: Switch Control not rendering in Grid in selected Tabbed page on Samsung Andro...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL: https://github.com/xamarin/Duplo/issu...
Depends on:
Blocks:
 
Reported: 2014-10-17 14:30 UTC by Jon Goldberger [MSFT]
Modified: 2016-07-27 13:14 UTC (History)
12 users (show)

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


Attachments
Test Project (452.71 KB, application/zip)
2014-10-17 14:30 UTC, Jon Goldberger [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 FIXED

Description Jon Goldberger [MSFT] 2014-10-17 14:30:08 UTC
Created attachment 8444 [details]
Test Project

## Description

The test project has a TabbedPage with three pages. The pages on tab 1 and there have a 1X2 Grid for the layout and there is a TextView in row 1 column 1 and a Switch in row 1 column 2. The Switch has HorizontalOptions set to LayoutOptions.end. After launching the app, the Switch shows on tab 1 but not on tab 3 until the device is rotated after tab 3 is selected. In addition, once tab 3 is selected and the device is rotated, switching back to tab 1 the Switch is slightly clipped on the top and bottom. Rotate the device, the Switch is no longer clipped, but will now be slightly clipped on the other tab. 

So far this seems to only occur on Samsung devices. This has not been observed on iOS either. This occurs using Forms 1.2.2 or 1.2.3. 

## Steps to reproduce

1. Launch the attached test project and restore packages.
2. Set the Android project as the startup project.
3. Launch to a Samsung device.
4. Select the third tab.

Expected result: Switch will display on the right.

Actual result: Switch is not displayed.

5. Rotate the device.

Switch is now displayed.

6. Select Tab 1

Expected result: Switch will be rendered normally.

Actual result: Switch is slightly clipped on top and bottom. 

## Note

Removing the HorizontalOptions = LayoutOptions.End setting on the Switch resolves the Switch not displaying on tab 3 issue, but does not resolve the clipping issue. I tried using various options for row height for the grid, but the clipping issue still occurred no matter the height set for the row.

I also note that the same does _not_ occur for a Button, neither the clipping nor the not displaying issue. I did not test other controls.
Comment 2 Rajneesh Kumar 2014-10-20 02:10:29 UTC
I have checked this issue and  and able to reproduce this . To reproduce this issue I have followed the steps and instruction provided in bug description. 

I observed that when I select the third tab Switch is not displayed, but when I rotate the device to landscape Switch is now displayed. I also observed that after rotating the device I click on Tab 1 Switch is slightly clipped on top and bottom. Please have look on on screenshot and screencast below:

Screenshot(Images): http://www.screencast.com/t/n1cFeJ16PvZ

Screencast: http://www.screencast.com/t/8dIncmZHgm8

Environment Info:

=== Xamarin Studio ===

Version 5.5.2 (build 3)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: 8.2.0.207 (Business Edition)
Hash: 3bf072d
Branch: 
Build date: 2014-10-15 21:44:26-0400

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.10.0.13 (Business Edition)

=== Build Information ===

Release ID: 505020003
Git revision: 6d4c806e383ba366b15fbccca9ddc1ba94f8d5ad
Build date: 2014-10-15 15:00:36-04
Xamarin addins: 069ddd29bb70a42238142eee9bac21a5e4b2f9f9

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2014-10-27 15:15:07 UTC
Adding a link to bug 23985 as a possible duplicate. That bug says "Possibly similar to bug 23908."
Comment 8 Jason Smith [MSFT] 2015-02-02 01:10:09 UTC
This should be fixed in 1.3.0
Comment 9 Rajneesh Kumar 2015-02-02 14:19:31 UTC
I have checked this issue with the Xamarin.Forms 1.3.2.6313-pre3 on Samsung Galaxy s5 Version: 4.4.2 and still getting the same behaviour.  Please refer the video of this issue.

Video Url: https://www.dropbox.com/s/kfw9304u8bblum9/20150203_001214.mp4?dl=0

Ide Logs: https://gist.github.com/Rajneesh360Logica/d3ba69f0a7226f321d67

Additional Information:  I also observed that only after rotating the device I click on Tab 1 Switch is not clipping.

Environment Info:

=== Xamarin Studio ===

Version 5.7.1 (build 16)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Build Information ===

Release ID: 507010016
Git revision: f12fcaf4707ab436bee2df6263eb5333197b262c
Build date: 2015-02-01 21:06:05-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 10 Jason Smith [MSFT] 2016-03-18 08:46:38 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we no longer believe it affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team
Comment 11 Roli 2016-07-26 19:03:40 UTC
I have a Xamarin.Forms project with 1 Switch inside. On Android Phones, there should be made no rotation, on Android Tablets, it's OK to make rotation.

If I start the page, no Switch is displayed. If I rotate it on the Tablet (from landscape to portrait or from portrait to landscape makes no differences), the Switch will be displayed after the first rotation. Also, I rotate it back...

On the Phone, where I can't rotate, no Switch will be displayed.

I ask me, who is set this Bug to FIXED and RESOLVED!

Roli
Comment 12 Parmendra Kumar 2016-07-27 13:14:04 UTC
@Roli, 

Could you please attached sample project? So that I can reproduce this issue at my end.

Thanks.