Blackberry downsize font to fit list line
1 answer
In your ListFieldCallback code, you will have a drawListRow () method. Choose a font:
public void drawListRow(ListField list, Graphics g, int index, int y, int w)
{
// Set text to draw in textString:
String textString = ...
Font smallerFont = FontFamily.forName(FontFamily.FAMILY_SYSTEM).getFont(fontStyle,
fontSize);
g.setFont(smallerFont);
g.drawText(textString, 0, y, DrawStyle.TOP|DrawStyle.LEFT, w);
}
+3
source to share