Category: BlackBerry Development
Error drawFocus bb 9780
Im confused i use this code and in bb 8520 works fine but in bb 9780 it appears to do something diferrent. And when the button gets the focus it draw all black.
protected void paint(Graphics graphics) {
graphics.setFont(font);
graphics.setColor(color);
graphics.drawBitmap(0, 0, graphics.getScreenWidth(), graphics.getScreenHeight(), imgBtn, 0, 0);
graphics.drawText(label, xTexto, (imgBtn.getHeight() - font.getHeight()) / 2);
}
protected void drawFocus(Graphics g, boolean on) {
g.setGlobalAlpha(0);
g.clear();
}