开发者

Background color for BlackBerry SplashScreen

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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜