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
Developer
Posts: 244
Registered: ‎01-31-2013
My Device: Developer

getting webview to display google.com full page

[ Edited ]

Hi,

 

I am using a webview, like below, when I load google.com it only loads it only fills it half the screen vertically,  looks sort of ridiculous,  is there a simply way to get it to fill the full page vertically.  ?, or get it to mimic the page background.  within the browser appit displays fine.

 

WebView

{

 

id: webView

 url: "http://www.google.com"

verticalAlignment: VerticalAlignment.Fill 

horizontalAlignment: HorizontalAlignment.Fill

}

 

thanks,



GeoYeo - Free Local classifieds - Built for Blackberry 10, if you like it please Rate It and Share it!
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: getting webview to display google.com full page

You will need to use a combination of ScrollView and scaling to display pages like normal browsers do.

 

Read this page to understand how to gain greater control of the WebView...

 

http://developer.blackberry.com/native/documentation/cascades/ui/webview/loadingwebcontent.html


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 244
Registered: ‎01-31-2013
My Device: Developer

Re: getting webview to display google.com full page

Hello,

 

Thank you for responding to my question.   I did read the document you have supplied a link to before hand.  My issue was that when I tried to display the main page of google.com within the webview it was only half filling the page vertically,  it was being displayed perfectly horizontally.  therefore I didn't want to play around with scale as the proportions were correct.  In addition I did have my webview within a scrollview, I just didn't include that snippet within my original question.  In any case, the google.com page being displayed within the webview and bb browser are different, hence the difference in vertical proportions onscreen.  I guess I could play around with useragent to fool it into thinking its rendering for something else. In any case in the interim I have just set a background within my parent container to white, as Google is my start page it looks acceptable, however should  the webview be navigated to something with a black background that also only par fills the page vertically then it will once again look odd. 

 

This is a very rare situation as most pages fill the webview window vertically and this situation becomes a non-issue.., however in there no SIMPLE way to continue filing the page vertically using the same background color as what the current page being navigated to uses.?

 

Thanks,



GeoYeo - Free Local classifieds - Built for Blackberry 10, if you like it please Rate It and Share it!
Highlighted
Retired
Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: getting webview to display google.com full page

Hi Robdob,

 

please provide your entire code snippet that is causing you this issue in order for us to reproduce what you are seeing. In case you think this could be a bug, then please create a jira ticket at this link: https://www.blackberry.com/jira/secure/Dashboard.jspa

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker