fade effect in blackberry (os 4.5 ) application.
Posted
by Vivart
on Stack Overflow
See other posts from Stack Overflow
or by Vivart
Published on 2010-06-16T06:23:07Z
Indexed on
2010/06/16
6:52 UTC
Read the original article
Hit count: 183
blackberry
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?
© Stack Overflow or respective owner