Hi
I am new to Blackberry development.My application contain five list items having strings each item.My requirement is when one cell is selected it should enlarge and other items adjust space automatically among them. I took two types of images for list items one for general view and one for displaying the selected item when user clicked on it which is of more height than previous.
But the problem is when I selected one item it is enlarging and overlapped on the next item and is not displaying full item and not adjusting the space among them. can anyone give me the solution for this. I am using the following code snippet....
_listField.setCallback(this);
_listField.setRowHeight(45);
_listField.setChangeListener(this);
public void drawListRow(ListField arg0, Graphics graphics, int index, int y, int width) {
if (listFieldIndex != index) {
graphics.drawBitmap(0, y, listBkgrnd.getWidth(), listBkgrnd
.getHeight(), listBkgrnd, 0, 0);
graphics.setColor(0xAA0000);
graphics.setFont(this.getFont().derive(Font.BOLD, 17));
graphics.drawText(((Station) _stationList.elementAt(index))
.getStationName(), 15, y + 15, 0,
(listBkgrnd.getWidth() - 70));
graphics.setColor(0x770000);
graphics.setFont(this.getFont().derive(Font.PLAIN, 13));
// graphics.drawText(
// ((Station) _stationList.elementAt(index)).getCT(), 15,
// y + 40, 0, (listBkgrnd.getWidth() - 65));
} else {
graphics.drawBitmap(0, y, playBkgrnd.getWidth(), playBkgrnd
.getHeight(), playBkgrnd, 0, 0);
graphics.setColor(0xAA0000);
graphics.setFont(this.getFont().derive(Font.BOLD, 17));
graphics.drawText(((Station) _stationList.elementAt(index))
.getStationName(), 15, y + 15, 0,
(playBkgrnd.getWidth() - 70));
graphics.setColor(0x770000);
graphics.setFont(this.getFont().derive(Font.PLAIN, 13));
graphics.drawText(
s.getCT(), 15,
y + 40, 0, (playBkgrnd.getWidth() - 65));
}
}