Bug 25935 - Android WebView height incorrect using CSS 100 percent
Summary: Android WebView height incorrect using CSS 100 percent
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: 1.3.4
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-12 13:16 UTC by John Miller [MSFT]
Modified: 2015-02-16 04:20 UTC (History)
7 users (show)

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


Attachments
Test Case (4.20 MB, application/zip)
2015-01-12 13:16 UTC, John Miller [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:
VERIFIED FIXED

Description John Miller [MSFT] 2015-01-12 13:16:30 UTC
Created attachment 9323 [details]
Test Case

**Overview:**

   When applying the css "height: 100%" to an element, the webview does not correctly calculate the height of that element based on all its children.

**Steps to Reproduce:**

   1. Run the attached TestCases "AndroidFormsWebView" solution on an API 19+ simulator / device. 

**Actual Results:**

   The height of the children is incorrect. 

**Expected Results:**

   Same results as the native non Forms project in the sample. 

**Build Date & Platform:**

   XF 1.3.1
   XA 4.20
   Android Api 19+

**Additional Information:**

   The test case zip has a native solution too that does not use Forms. This project produces the expected results.
Comment 1 Akhilesh kumar 2015-01-12 14:29:34 UTC
We are also able to reproduce this issue at our end. We are getting the height of the children is incorrect. We are not getting result of "AndroidFormsWebView" solution same as native non Forms project.

Screencast: http://screencast.com/t/fQmJV8NkqL
Application output: https://gist.github.com/AkhileshKumar01/9c31aede14fa86367ad7
XAP log: https://gist.github.com/AkhileshKumar01/d1df9741eeb6910c3766

Environment info:
=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: ff0c16c6-3c75-46d8-ac56-56c3b56e2c76
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

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

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/360_macmini/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)

=== Xamarin.Mac ===

Version: 1.12.0.0 (Business 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.1
Darwin Apples-iMac.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 14:30:19 UTC
Should be resolved in 1.3.4-pre1
Comment 4 Akhilesh kumar 2015-02-10 10:23:22 UTC
I have checked this issue with "Xamarin.Forms 1.3.4.6325-pre1" and I am still observing same issue.

So I am reopening this issue.

Screencast: http://screencast.com/t/CFenv8pmNtON
Application Output: https://gist.github.com/saurabh360/383dc591ddad2fa996dc
XAP Device log: https://gist.github.com/saurabh360/d1d902a2b0d8e4c039f6


Xamarin.Forms 1.3.4.6325-pre1

=== Xamarin Studio ===

Version 5.7.1 (build 17)
Installation UUID: ff0c16c6-3c75-46d8-ac56-56c3b56e2c76
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.1.20 (Trial Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Mac ===

Version: 1.12.0.6 (Trial Edition)

=== Xamarin.Android ===

Version: 4.20.0.28 (Trial Edition)
Android SDK: /Users/360_macmini/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)

=== Build Information ===

Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.10.1
Darwin Apples-iMac.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 5 Jason Smith [MSFT] 2015-02-11 18:31:04 UTC
This reproduction case here does not use the correct webview renderer for the platform so it did not get hte fix. They need to set the LayoutParams of their custom android webview to be MatchParent to get the fix.
Comment 6 Parmendra Kumar 2015-02-12 12:07:32 UTC
Hi Joson,

Actually, I am little bit confused here.

The above code is working fine in Android application but I am getting different behavior when I used same code in forms application.

I am not sure why there is the discrepancy in between the output of same code in forms  application and android application.

As of now I am reopening this issue. Please suggest for the same.

Thanks
Comment 7 Jason Smith [MSFT] 2015-02-13 16:03:57 UTC
The discrepency is because he is using his own renderer. This issue is resolved but he would have to either update his own renderer or use ours to receive the fix.
Comment 8 Parmendra Kumar 2015-02-16 04:20:21 UTC
Thanks Jason for clarification,

As per comment #7 I am closing this issue.