Re: [android-developers] Images in ListView in wrong places

2010-06-09 Thread Mark Murphy
julius wrote: Hi, I have a ListView which has rows that include an ImageView. I am populating the ImageView with the following code (getting the image from the SDCard if available): Bitmap bmp = BitmapFactory.decodeFile(filename); ImageView iv = getCoverImageView();

Re: [android-developers] Images in ListView in wrong places

2010-06-09 Thread Julius Spencer
Hi Mark, Thank you for the reply. You could use iv.setImageURI(Uri.fromFile(...)). Oh great, yes I did read that. :) However when I scroll and the images are loaded they seem to turn up in the wrong places. Are you doing the image loading in the main application thread, or a background

Re: [android-developers] Images in ListView in wrong places

2010-06-09 Thread Mark Murphy
Well, all I can tell you is that the symptom of images seem randomized when I scroll usually points to some sort of binding problem. Julius Spencer wrote: Are you sure your SDIReleaseWrapper is pointing to the right ImageView? Yes I performed a search and the only layout (or xml file for that

Re: [android-developers] Images in ListView in wrong places

2010-06-09 Thread Julius Spencer
Well, all I can tell you is that the symptom of images seem randomized when I scroll usually points to some sort of binding problem. Julius Spencer wrote: Are you sure your SDIReleaseWrapper is pointing to the right ImageView? Yes I performed a search and the only layout (or xml file for

Re: [android-developers] Images in ListView in wrong places

2010-06-09 Thread Mark Murphy
Julius Spencer wrote: Would you recommend filling the images via an AsyncTask given they are coming from the SDCard? Flash reads are relatively quick, so unless you are perceiving scrolling as being janky (to use Brad Fitzpatrick's term), I wouldn't worry about it. If you were fetching images

RE: [android-developers] Images in ListView in wrong places

2010-06-09 Thread 楊健
I meet the same problem when I used a class inherit from BaseAdapter , My solution is set the image every time in BaseAdapter.getView(). I think this is the same of if(null!=iv) iv.setImageBitmap(bmp); try to comment out the if(null!=iv) -Original