How to draw background image of listfield rows?
I have a customized ListField with an icon and text on each rows. How can i 开发者_开发问答add background images to rows (in drawListRow()
method).
I think it should be smth like this:
public void drawListRow(ListField listField,
Graphics graphics, int index, int y, int width) {
Bitmap bg = <here is the code to get your Bitmap for bg>;
// probably load that bitmap once in ListField constructor
// to speed up the drawListRow()
graphics.drawBitmap(0, y, bg.getWidth(), bg.getHeight(), bg, 0, 0);
}
精彩评论