Hey experts,
I am fairly new to BB development. I had read that blackberry code is forwards compatable. So if i coded my app for a blackberry curve, it would work on an newer phone (ie. newer OS) such as a blackberry Bold.
However, I wrote an app that works great on ym blackberry curve (ver 4.2.2) but it isn't displaying the same on my boss's blackberry bold (ver 4.6).
On my phone, i have a custom ObjectListField that for each row, it displays 2 lines of text. However, on my bosses phone, it only displays the first line of text and the second line of text is hidden. Does "setRowHeight" not work in version 4.6?
What am I missing?
Thanks!!
Code:
private class MyObjectListField extends ObjectListField {
private Bitmap icon = Bitmap.getBitmapResource("img/document.png");
// We are going to take care of drawing the item.
public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width) {
setRowHeight(index,(getRowHeight()*2)+4);
graphics.drawBitmap(1,y+3, icon.getWidth(), icon.getHeight(),icon,0,0);
graphics.drawText(tickets[index].id, 18, y+3, DrawStyle.LEFT|DrawStyle.ELLIPSIS, 50);
graphics.drawText(tickets[index].requestedDueDate, 18, y+getRowHeight()+2, DrawStyle.LEFT|DrawStyle.ELLIPSIS, 50);
graphics.drawText(tickets[index].targetUser, 70, y+3, DrawStyle.LEFT|DrawStyle.ELLIPSIS, 150);
graphics.drawText(tickets[index].assignedTo, 265, y+3, DrawStyle.RIGHT, 50);
graphics.setColor(0x949494);
// the following line of next should be on the line below the text above
graphics.drawText(tickets[index].description, 70, y+getRowHeight()+2, DrawStyle.ELLIPSIS, 245);
}
}