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

Web and WebWorks Development

Reply
Developer
Developer
Posts: 132
Registered: ‎01-24-2013
My Device: blackberry z10
My Carrier: none

Show simple WebPage (without "close" button)

Hello.

 

Im trying to write a simple app for blackberry 10 which shows a mobile internet webpage and lets the user interact with it. It should seem to the user like its a "normal" app, in so far as it should not be obviously the browser showing a webpage (no address bar etc).

I tried to do this with webworks and the config.xml below


The app works quite well apart from the following

 

(1) I get a "close" button in the top left and a "header" bar with some text (the apps name) it.

How can I get rid of this, so that the app shows "full screen"?

 

(2) THe web page shown gets shown too small..theres space "wasted" to the right and below the actual content. Its as if the actualy content of the webpage is squeezed into the top left quarter of the available device screen. The text size is made correspondingly small.

Any idea why and how I can get the webpage to "fill out" to the rest of the available screen space (and the text size made correspondingly larger)?

 

Id be very grateful for any help at your earliest convenience.

Best Wishes

 

config.xml

-------------------

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.7.0" id="mvolution" xml:lang="en">
<author href="http://www.mytes.de"
rim:copyright="Copyright 1998-2013 Lufthansa">Lufthansa</author>
<name>Lufthansa</name>
<content src="https://lh-acpt.sapient.de"/>
<feature id="blackberry.app">
    <param name="orientation" value="portrait" />
</feature>
</widget>

Developer
Developer
Posts: 132
Registered: ‎01-24-2013
My Device: blackberry z10
My Carrier: none

Re: Show simple WebPage (without "close" button)

After some more investigation it seems I was being thrown by the fact that the webpage I was testing with was redirecting.

 

My issue now becomes:

When the user clicks on a link that attempts to open content in target _blank (ie on the desktop browser a new window/tab would open) then my app shows a "child window" which by default has a "close button" and a title bar.

see also https://github.com/blackberry/BB10-WebWorks-Framework/issues/230

Is it possible to override this behaviour.

Id like to always show the (new) page in the same window (ie no close button or title bar)?

If I try adding the "childBrowser" element as below, then the new page gets opened in the browser.

 

 

<feature id="blackberry.app">
    <param name="orientation" value="portrait"/>
    <param name="childBrowser" value="disable" />
</feature>

 

Anyone have a suggestion how to get all new pages shown in the same (fullscreen) window?

 

Thanks very much in Advance

BlackBerry Development Advisor
Posts: 635
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Show simple WebPage (without "close" button)

Hello,

 

Yes, you can open a page without seeing the close button.  Check out this sample which will show you all the ways of working with the childWindow

 

https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/childBrowser

 

Developer
Developer
Posts: 132
Registered: ‎01-24-2013
My Device: blackberry z10
My Carrier: none

Re: Show simple WebPage (without "close" button)

Hello.

 

Thanks for the suggestion.

This is however not what I mean.

In this app when one clicks "_blank" then a new webview opens up with a close button in the title bar.

 

I was looking for a way to override this behaviour, so that even when the user clicks on a target "_blank" that the new page gets shown in the same window (with no "close" button).

 

Is there a way to achieve this?

 

Thanks in Advance.

 

BlackBerry Development Advisor
Posts: 635
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Show simple WebPage (without "close" button)

Oh I see.  No, not that I'm aware of.

Developer
Developer
Posts: 132
Registered: ‎01-24-2013
My Device: blackberry z10
My Carrier: none

Re: Show simple WebPage (without "close" button)

Thanks all the same.

Best  Wishes