【发布时间】:2011-05-30 06:26:22
【问题描述】:
我为我的 BlackBerry 应用程序实现了启动画面和主页。在启动画面页面上,我想将背景颜色更改为黑色。
【问题讨论】:
标签: blackberry java-me
我为我的 BlackBerry 应用程序实现了启动画面和主页。在启动画面页面上,我想将背景颜色更改为黑色。
【问题讨论】:
标签: blackberry java-me
在您使用的 SplashScreen 中
public class SplashScreen extends MainScreen {
public SplashScreen(){
getMainManager().setBackground(
BackgroundFactory.createSolidBackground(0x00000000);
);
}
}
【讨论】:
你可以做几件事。您可以调用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);
}
【讨论】: