Bug 23972 - SwitchCell is vertically clipped and thus broken on Android in 1.3.0
Summary: SwitchCell is vertically clipped and thus broken on Android in 1.3.0
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-21 17:20 UTC by luca.barbieri
Modified: 2015-02-05 05:32 UTC (History)
4 users (show)

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


Attachments
SwitchCell bug (83.73 KB, image/png)
2014-10-21 17:20 UTC, luca.barbieri
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 luca.barbieri 2014-10-21 17:20:54 UTC
Created attachment 8462 [details]
SwitchCell bug

On Android, SwitchCell is clipped and thus unusably broken because the height is only a few pixels rather than the height needed to display the contents.

Attached is a screenshot of Forms Gallery from the Xamarin Android player Nexus 4 image.

Using Xamarin Forms 1.3.0.6262-pre0; it worked in 1.2.3.

IDE info:

Xamarin Studio
Version 5.6.2 (build 5)
Installation UUID: 364be21f-8e52-435c-b4d2-f93a59cb15dd
Runtime:
	Mono 3.10.0 ((detached/633e444)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000020

Apple Developer Tools
Xcode 6.0.1 (6528)
Build 6A317

Xamarin.iOS
Version: 8.2.0.193 (Indie Edition)
Hash: 959c1e4
Branch: 
Build date: 2014-10-03 00:25:37-0400

Xamarin.Android
Version: 4.18.0 (Indie Edition)
Android SDK: /Users/lb/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.0    (API level 11)
		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.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Xamarin.Mac
Version:

Build Information
Release ID: 506020005
Git revision: 19bc3b64b70332bfab18faf9cf1ce7d3aa191b36
Build date: 2014-10-17 14:49:01-04

Operating System
Mac OS X 10.9.5
Darwin lbs-Mac.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 1 luca.barbieri 2014-10-21 17:37:14 UTC
It looks like this might be caused by the fact that BaseCellView.SetRenderHeight is called with an height in device independent pixels, but it then calls LinearLayout.LayoutParams with apparent takes physical pixels.

If so, this means that setting an explicit height on all kinds of cells is also broken.

Not totally sure about this though.
Comment 2 Arpit Jha 2015-02-04 02:05:19 UTC
I have checked this issue and able to reproduce this issue, getting same behaviour as mentioned in bug description.

Steps I have followed to reproduce this issue.

1. Create a Xamarin.Form protable application.
2. Add an empty class .
3. Implement code in added class. 
    Implemented code :https://gist.github.com/Arpit360/527c6d340daf2d6b2368
4. Set android as startup project.
5. Run the application.

Environment Info:

Xamarin.Forms version : 1.3.0.6275-pre1

=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: 3d25a767-a003-4a7d-9f5e-e57987cf6cf0
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.0.51 (Trial Edition)
Hash: dfb682f
Branch: 
Build date: 2015-01-08 13:39:32-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Trial Edition)
Android SDK: /Users/mac360_xamarin/Library/Developer/Xamarin/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.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin.Mac ===

Version: 1.10.0.18 (Starter Edition)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.10.0
Darwin mac360-xamarins-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 3 Jason Smith [MSFT] 2015-02-05 05:32:48 UTC
This should be fixed in 1.3.2