10-13-2011 08:52 AM
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?
10-19-2011 10:10 PM
11-01-2011 10:49 AM
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!
11-01-2011 01:47 PM
09-17-2012 03:01 AM