I implem开发者_运维百科ented a splashscreen and a mainpage for my BlackBerry app. On the splashscreen page I want to change the background color to black.
In the SplashScreen that you use
public class SplashScreen extends MainScreen {
public SplashScreen(){
getMainManager().setBackground(
BackgroundFactory.createSolidBackground(0x00000000);
);
}
}
You could do a couple things. You could call getDelegate().setBackground(BackgroundFactory.createSolidBackground(Color.BLACK))
or override the Screen's paint method to
protected void paint(Graphics graphics) {
int oldColor = graphics.getColor();
graphics.setColor(Color.BLACK);
graphics.clear();
graphics.setColor(oldColor);
super.paint(graphics);
}
精彩评论