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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 204
Registered: ‎08-09-2010
My Device: 9930, PlayBook
My Carrier: Verizon Wireless

BB7 BrowserField does not render in mainscreen "paint" method

Up until OS 7, I was able to manipulate the graphics object in the "paint" method of a screen where a browserfield was present.  If i have a browserfield on the screen in os 7, it appears to draw the browserfield on top of whatever drawing was done in the paint method.  My app fakes some screen transitions while it is scrolling the browserfield so in os 7 this is broken.  is this something that will be fixed?  does anyone have a workaround?

Developer
Posts: 466
Registered: ‎03-04-2009
My Device: 8520
My Carrier: some

Re: BB7 BrowserField does not render in mainscreen "paint" method

sticking to this thread.
I have the similar issue.
i have a browserfield and listfield. Only one Field can be displayed at the same time. So in manager i'm doing add/remove for each field above . That causes IllegalStateException being thrown internally in BrowserField. ( i see this in EventLogger).
Got resolved! Press kudo icon!
Developer
Posts: 204
Registered: ‎08-09-2010
My Device: 9930, PlayBook
My Carrier: Verizon Wireless

Re: BB7 BrowserField does not render in mainscreen "paint" method

Just to freshen up this topic, I am including a screenshot of the behavior i described in the first post as well as a sample project.  On the left is an OS 6 9800 simulator showing the attached sample app.  The browserfield is rendered, then a semi-transparent rectangle is drawn on the screen covering part of the browserfield.  On the right is the OS 7 9900 simulator with the same app running.  as you can see, the red rectangle appears to be behind the browserfield.  Here is the paint() method of this screen:

 

...
protected void paint(Graphics graphics)
{
//when the browserfield renders, it should be painted in this method
super.paint(graphics);

//after the screen is painted, let's draw a see-thru red rectangle on the right hand side of the screen
graphics.setColor(Color.RED);
graphics.setGlobalAlpha((int) (0xFF*.5));
graphics.fillRect(Display.getWidth()/2, 0, Display.getWidth()/2, Display.getHeight());

//This works in all oses < 7...why in OS 7 does the browserfield render AFTER the paint method is fired?
}

...

 

 

 

 

This is definately a bug that I need to resolve or work around for os 7 devices.  Any suggestions are welcome!

 

 

BrowserFieldPaintIssue.png

 

Developer
Posts: 204
Registered: ‎08-09-2010
My Device: 9930, PlayBook
My Carrier: Verizon Wireless

Re: BB7 BrowserField does not render in mainscreen "paint" method

I have created a bug in JIRA for this:

https://www.blackberry.com/jira/browse/JAVAAPI-2141

 

 

Highlighted
New Developer
Posts: 14
Registered: ‎04-01-2012
My Device: 9630
My Carrier: MTN

Re: BB7 BrowserField does not render in mainscreen "paint" method

have you been able to resolve this? If so how? Thanks.