我开发了简单的代码来在黑莓屏幕上显示图像和标题,但我无法显示任何内容(但如果我只测试标题,它就可以工作)。
我的要求是在列表中显示带有标题的图像。
我已按照此链接从图像 url 获取图像
这里是我在 drawlistrow 方法中的代码:
public void drawListRow(ListField list, Graphics g, int index, int y, int w)
{
String text = (String)listElements.elementAt(index);
Bitmap image =GetImage.connectServerForImage("http://toucheradio.com/toneradio/iphone/toriLite/toriLive.png");
g.drawLine(0, y, w, y);
g.drawText(text, 150, y, 60, w);
g.drawBitmap(0,y,image.getWidth(),image.getHeight(),image,0,0);
}
可能是什么问题呢?