in my blackberry application i have to create a effect in which fullscreen bitmap is slowly disappearing and ui screen is coming up.
protected void paint(Graphics g) {
g.setGlobalAlpha(globalAlpha);//starting value of globalAlpha is 255.
g.drawBitmap(0, 0, getWidth(), getHeight(), _bitmap, 0, 0);
g.setGlobalAlpha(255 - globalAlpha);
globalAlpha--;
super.paint(g);
}
This code is just for giving demo that what i want. super.paint(g) is calling 255 times because of that its a poor code. in one timer task i am calling invalidate();
So any suggestions how to implement this?