0

I used this library lots of time. But I get an exception from Eclipse that the title name. Codes are here;

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;
}

}

you know displayImage is a method of this class. I cant see any error or exception. What can i do?

emreturka
  • 846
  • 3
  • 18
  • 44

1 Answers1

0

Parameters to displayImage is location, view and options

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

look into the sample

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

blganesh101
  • 3,647
  • 1
  • 24
  • 44
  • Also there imageLoader.displayImage(imageUrls[position], imageView); this method. only url and imageView. – emreturka Jun 27 '13 at 10:54
  • mageLoaderConfiguration config = new ImageLoaderConfiguration.Builder( getApplicationContext()).build(); I used here getApplicationContext() instead of context. This is not an error isn't it? – emreturka Jun 27 '13 at 11:24