1

这是我的代码。我无法从此矢量对象创建图像。

Hashtable metaData = new Hashtable();

Vector Ad = IADView.getBannerAdData(LwuitAd.this, "MyCompany_MyApp", metaData);
Object retImg = null;

if (null != Ad) {
    retImg = Ad.elementAt(0);
}

if (retImg != null) {
    com.sun.lwuit.Image img = com.sun.lwuit.Image.createImage(Ad.elementAt(0));// it shows error in this line
    Button buttonAd = new Button();
    buttonAd.setIcon(img);
    f.addComponent(BorderLayout.NORTH, buttonAd);
    f.show();
} else {
    System.out.println("retImg is null");
}
4

1 回答 1

2

使用类从 Inneractive 的 IADView 中提取图像

https://projects.developer.nokia.com/JMEWeatherApp/browser/jmeweatherapp/src/com/nokia/example/weatherapp/ads?rev=b5af8939ab6a9bb084c56ff898989534a06afc38&order=name

您还可以在诺基亚天气项目中查看它的实施情况

干杯

于 2013-08-21T11:40:28.083 回答