【问题标题】:Background color for BlackBerry SplashScreenBlackBerry SplashScreen 的背景颜色
【发布时间】:2011-05-30 06:26:22
【问题描述】:

我为我的 BlackBerry 应用程序实现了启动画面和主页。在启动画面页面上,我想将背景颜色更改为黑色。

【问题讨论】:

    标签: blackberry java-me


    【解决方案1】:

    在您使用的 SplashScreen 中

     public class SplashScreen extends MainScreen {
    
             public SplashScreen(){
                 getMainManager().setBackground(
                          BackgroundFactory.createSolidBackground(0x00000000);
                      );
             }
     }
    

    【讨论】:

      【解决方案2】:

      你可以做几件事。您可以调用getDelegate().setBackground(BackgroundFactory.createSolidBackground(Color.BLACK)) 或覆盖屏幕的绘制方法来

      protected void paint(Graphics graphics) {
          int oldColor = graphics.getColor();
          graphics.setColor(Color.BLACK);
          graphics.clear();
          graphics.setColor(oldColor);
          super.paint(graphics);
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-04-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-11-11
        相关资源
        最近更新 更多