0

我经常使用这个库。但是我从 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 是这个类的一个方法。我看不到任何错误或异常。我能做些什么?

4

1 回答 1

0

参数displayImage是位置、视图和选项

 imageLoader.displayImage(imageUrls[position], imageView, options);

查看样本

https://github.com/nostra13/Android-Universal-Image-Loader/blob/master/sample/src/com/nostra13/example/universalimageloader/ImageGalleryActivity.java

于 2013-06-27T10:52:28.650 回答