我使用这个库很多时间。但是我从Eclipse获得了标题名称的异常。代码在这里;
public class HaberDetay extends Activity {
private HaberlerItems haberitem = null;
private ImageLoader imageloader;
private ImageView haberImage;
private TextView lblTitle, lblDescription, lblTarih;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_haber_detay);
imageloader = ImageLoader.getInstance();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
getApplicationContext()).build();
imageloader.init(config);
lblTitle = (TextView)findViewById(R.id.lblTitle);
lblDescription = (TextView)findViewById(R.id.lblDescription);
lblTarih = (TextView)findViewById(R.id.lblTarih);
haberImage = (ImageView)findViewById(R.id.imgHaber);
haberitem = (HaberlerItems)getIntent().getSerializableExtra("haberitem");
if(haberitem != null){
lblTarih.setText(haberitem.getDateAdded());
lblTitle.setText(haberitem.getTitle());
lblDescription.setText(Html.fromHtml(haberitem.getDescription()));
imageloader.displayImage(haberitem.getImageUrl(), haberImage);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.haber_detay, menu);
return true;
}
}
你知道displayImage是这个类的一个方法。我看不到任何错误或异常。我该怎么办?
答案 0 :(得分:0)
displayImage
的参数是位置,视图和选项
imageLoader.displayImage(imageUrls[position], imageView, options);
查看示例