Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Developer
Posts: 49
Registered: ‎11-11-2012
My Device: z10 LE
My Carrier: Digi
Accepted Solution

webview (10.1.0.273, 10.1.0.1435) showed as 3mm tall. 10.0.9/10.0.10 is OK.

[ Edited ]

Hi,

 

I checked my local html file (stored in the phone) as HTML5 OK.

It showed up well, filling up the entire device's screen on z10 and q10 v10.0.X.

However on 10.1.X e.g. 10.1.0.273, 10.1.0.1435, it is only 3mm tall. 

 

Appreciate any tips.

 

*updated: Found by webinspector that the html element width & height dimension in 10.1 is detected as 342 x 7 px while 10.0.X is 342 x 570px. Anybody with an explanation why this is the case? Guess I can fix this by setting e.g. 342px to the height to workaround.

 

**Workaround: Managed to got a solution by using CSS media query to adjust the height until I find out why 100% is interpreted as "7px" by 10.1 when it's the full width by 10.0.

 Workaround: Used Innovatology's suggestion.

thanks,
James Tan

 

----My CSS for the google map canvas----

<style type="text/css">
	html {
	    height: 100%
	}
	body {
	    height: 100%;
	    margin: 0;
	    padding: 0
	}
	
	#map_canvas {
	    width: 100%;
	    height: 100%;
	}
</style>

 

 

 

 

 

----My Webview call in QML is very simple----

WebView {
    id: webView
    url: "local:///assets/webview/index.html"
}

 ----Here's a screenshot of the view in 10.1----

IMG_00000153.png



James Tan
Eating my dog food - TripLogger, my 1st bb10 app.
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: webview (10.1.0.273, 10.1.0.1435) showed as 3mm tall. 10.0.9/10.0.10 is OK.

Known issue on 10.1:

 

https://www.blackberry.com/jira/browse/BBTEN-1247

 

Workaround, should work on 10.0 too:

 

WebView { 
    ... 
    preferredWidth: Infinity 
    preferredHeight: Infinity 
}

 

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
Posts: 49
Registered: ‎11-11-2012
My Device: z10 LE
My Carrier: Digi

Re: webview (10.1.0.273, 10.1.0.1435) showed as 3mm tall. 10.0.9/10.0.10 is OK.

Thanks! It's working and I don't have to mess with the HTML's CSS which is tricky to get right.

By the way, can you share the summary/content in "https://www.blackberry.com/jira/browse/BBTEN-1247" as it says I'm not allowed to view it. Thanks!


James Tan
Eating my dog food - TripLogger, my 1st bb10 app.
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: webview (10.1.0.273, 10.1.0.1435) showed as 3mm tall. 10.0.9/10.0.10 is OK.


jameztcc wrote:
By the way, can you share the summary/content in "https://www.blackberry.com/jira/browse/BBTEN-1247" as it says I'm not allowed to view it. Thanks!

That's a dfifferent bug, in JIRA. I'll ask one of the dev support folks.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands