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
New Contributor
Posts: 3
Registered: ‎11-07-2012
My Device: 9320
My Carrier: multi

BrowserField disappears on scroll

Hi,

I am new to BlackBerry and it is nice to be here Smiley Happy

I have following problem:

My application is based on PageManagerView. In one of the Panes after pressing specified item BrowserField with local html content is displayed. Unfortunately, if user starts scrolling the BrowserField it disappears.

Structure of my views/fields is following:
MainScreen -> PaneManagerView -> VerticalFieldManager(NO_SCROLL) -> VerticalFieldManager(VERTICAL_SCROLL) -> BrowserField

 

Bellow I attach code which I use to add and present BrowserField:

 

if (resourceAddr.length() > 0) {
	mFirstPageFocusedMenuItemIndex = mFirstMenuPage.getFieldWithFocusIndex();
	System.out.println("Present web view " + mFirstPageFocusedMenuItemIndex);
	
	VerticalFieldManager browserManager = new VerticalFieldManager(FOCUSABLE | VERTICAL_SCROLL | NO_HORIZONTAL_SCROLL | USE_ALL_HEIGHT | VERTICAL_SCROLLBAR);

	BrowserField browserField = new BrowserField();
	browserManager.add(browserField);
	InputStream in = getClass().getResourceAsStream(resourceAddr);

	replace(mFirstMenuPage,browserManager);
	mViewsVector.addElement(browserManager);
	mCurrentMenuPage = WEBVIEW_MENU_PAGE;
	
	try {
		byte[] data = IOUtilities.streamToBytes(in);
		browserField.displayContent(data, "text/html", "local:///ofirmie/");
	} catch (Exception e){
		e.printStackTrace();
	}
}

 

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

Re: BrowserField disappears on scroll

Try this:

VerticalFieldManager browserManager = new VerticalFieldManager(FOCUSABLE | VERTICAL_SCROLL | NO_HORIZONTAL_SCROLL | VERTICAL_SCROLLBAR);

 

I have removed:

USE_ALL_HEIGHT

New Contributor
Posts: 3
Registered: ‎11-07-2012
My Device: 9320
My Carrier: multi

Re: BrowserField disappears on scroll

Thanks for your answer, unfortunately this does not help.

 

I will try to extract the code and put it in example app, which will be  without panes

New Contributor
Posts: 3
Registered: ‎11-07-2012
My Device: 9320
My Carrier: multi

Re: BrowserField disappears on scroll

Unfortunately it does work when added to single MainScreen in basic, one screen, Hello World application. The only thing which I had to change was addition of USE_ALL_HEIGHT | USE_ALL_WIDTH . After adding this flags to my complex project things are worse. BrowserField does not even display, however scrolling arrows are visible.

 

I don't know what to do now ?? Smiley Sad