Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to customize listfield items?
    primarykey
    data
    text
    <p>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.</p> <p>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....</p> <pre><code>_listField.setCallback(this); _listField.setRowHeight(45); _listField.setChangeListener(this); </code></pre> <p>public void drawListRow(ListField arg0, Graphics graphics, int index, int y, int width) {</p> <pre><code> 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)); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload