开发者

Background color for BlackBerry SplashScreen

开发者 https://www.devze.com 2023-03-08 16:52 出处:网络
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

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

精彩评论

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