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

Java Development

Reply
Developer
lcaro
Posts: 95
Registered: ‎10-19-2010
My Device: Blackberry 8110
My Carrier: Generic

BrowserField issue in Bold 9900

Hello,

 

I'm having an issue with BrowserField in the Bold 9900. The field will take up the whole width. I don't want the browserField to take up all the width available as I want to use bitmap borders.

 

Currently I'm adding the browserField in a VerticalFieldManager(this manager has a border) and the text is cut off at the end(right hand side of the screen).

 

If I remove the border and I let the browserfield take up all the width of the screen it works fine.

 

This issue just happens on this device as I am testing on other devices and simulators and it works just fine, the browserField will wrap the text correctly(the text is not cut off at the end).

 

I don't know whether this issue is just related to the Bold 9900 or not.

 

Has anyone experienced this?

 

Thank you very much indeed

Regards

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: BrowserField issue in Bold 9900

There is a known issue with browserField when it does not take all screen width & all screen height.

From my experience, and I hope someone already found a workaround, use all screen width and use HTML for your borders.

E.

Please use plain text.
Developer
Anand04
Posts: 93
Registered: ‎06-05-2012
My Device: Developer
My Carrier: Developer

Re: BrowserField issue in Bold 9900

Hi Icaro,

can you please post your code which you are using for BrowserField?

thanks,
Please use plain text.
Developer
lcaro
Posts: 95
Registered: ‎10-19-2010
My Device: Blackberry 8110
My Carrier: Generic

Re: BrowserField issue in Bold 9900

BrowserFieldConfig config = new BrowserFieldConfig();
config.setProperty(BrowserFieldConfig.NAVIGATION_MODE, BrowserFieldConfig.NAVIGATION_MODE_CARET);
config.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.FALSE);
config.setProperty(BrowserFieldConfig.ENABLE_GEARS, Boolean.FALSE);
config.setProperty(BrowserFieldConfig.ALLOW_CS_XHR, Boolean.FALSE);
config.setProperty(BrowserFieldConfig.MDS_TRANSCODING_ENABLED, Boolean.FALSE);
config.setProperty(BrowserFieldConfig.USER_SCALABLE, Boolean.FALSE);

BrowserField bf = new BrowserField(config)
bf.requestContent("local:///longtext.html");

 Hello,

 

This is the code I'm using to create the browserField. After this I just add this field to a VerticalFieldManager and I add it to the screen.

 

Like I said before, the problem is that I can't change the width of the browserField for the Bold 9900. The browserField will always take the full width of the screen and it will cut off the text if the manager does not take the full screen. However, for other devices, the text will be wrapped.

 

Maybe you guys are able to reproduce the issue.

 

Thank you very much indeed

Regards

Please use plain text.
Developer
cyndrilla
Posts: 84
Registered: ‎07-22-2011
My Device: bb-9550,bb-9700
My Carrier: bb developer

Re: BrowserField issue in Bold 9900

Hi,

 

In the html that you use replace the style tag as

<p style=text-align: justify; dir=LTR>

 

Thanks

 
Please use plain text.
Developer
lcaro
Posts: 95
Registered: ‎10-19-2010
My Device: Blackberry 8110
My Carrier: Generic

Re: BrowserField issue in Bold 9900

Hi cyndrilla and thanks for replying,

 

The problem is not the HTML file.

 

The problem is that I can't make the BrowserField smaller(width). Let's say I want the browserField to take 90% of the screen width. I use a manager for that(overriding sublayout). The text will be cut off because the browserField is using the full screen width regardless of the size of the manager. This just happens in 9900 device.

 

Rest of devices browserField adjusts its size according to the size of the manager.

 

If you want to reproduce this issue, just create a browserField and add it to a VerticalFieldManager. Set some margins(left, right) for that manager or override sublayout method(don't let the manager take the whole width of the screen), load an html file(local file) and run it on the Bold 9900 and you will see how the browserField takes all the screen width regardless of the size of the manager.

 

Thank you very much indeed

Regards

Please use plain text.