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
Posts: 271
Registered: ‎12-24-2010
My Device: BlackBerry 10
My Carrier: Airtel

White screen is displaying while loading local HTML files in Browser Field

Hi,

 

I am using Browser Field to display some local HTML files in my application. It is displaying the HTML files properly. But while starting of the screen it is displaying some white screen. How can i get rid of this issue??

 

I have added the below code:

 

BrowserFieldConfig _bfConfig = new BrowserFieldConfig();
		_bfConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
		_bfConfig.setProperty( BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE );
		_bfConfig.setProperty(BrowserFieldConfig.USER_AGENT, "MyApplication 1.0");
                BrowserField myBrowserField = new BrowserField(_bfConfig);
		add(myBrowserField);
		BrowserFieldRequest request = new BrowserFieldRequest("local:///OTPhelp_en.html");
		myBrowserField.requestContent(request);

   Please help me..

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: White screen is displaying while loading local HTML files in Browser Field

Presumably this is the screen that is displaying while your page is loading.  So you could display some sort of splash screen, or perhaps some 'loading' screen. 

 

Either way, you can add a BrowserFieldListener to the BrowserField and then dismiss the screen when the

documentLoaded(..)

method is called. 

 

Review the API for more on BrowserFieldListener. 

Developer
Posts: 271
Registered: ‎12-24-2010
My Device: BlackBerry 10
My Carrier: Airtel

Re: White screen is displaying while loading local HTML files in Browser Field

Showing the pop up may be a way. But i don't want to display any progress bar or loading bar. Is there any alternative way??

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: White screen is displaying while loading local HTML files in Browser Field

What do you want to display?

Developer
Posts: 271
Registered: ‎12-24-2010
My Device: BlackBerry 10
My Carrier: Airtel

Re: White screen is displaying while loading local HTML files in Browser Field

When user will reach to my screen, he will be able to see the help content which i am getting from the HTML files. I don't want to display any loading bar while loading the HTML files on the Browser Field.

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: White screen is displaying while loading local HTML files in Browser Field

Can you change your help screen to something really simple that will display very quickly.  Then you can test to see if the white screen is while it is loading?