-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First image inside a listview sometimes displays wrong image #83
Comments
Can you show |
Field Contact.AVATAR is retrieved from SQLiteDatabase using an inner join. FIRSTNAME_N_LASTNAME (is just a SQL concat using '||' of Contact.FIRSTNAME and Contact.LASTNAME) are always correctly displayed.
I really think about a problem regarding view reusage, but I can't find why, this is really very strange. |
Do you have this problem only for first item in ListView or for different items? |
It *seems *to only occur on the first item... |
I don't know what the problem. I can help you only if you provide me whole project sources (and used libraries) so I can test it and try to find a solution. If you accept this way then send it to my email (look into Readme). |
7 days, no answer. |
Seems OK since #71 |
Have same issue. Also if you scroll VERY quick up and down. Some images appear in the places where should be empty placeholders (where image not set). public class ProductAdapter extends CursorAdapter {
private int rowLayout;
private LayoutInflater inflater;
public ProductAdapter(Activity context, int rowLayout, Cursor c) {
super(context, c, false);
this.rowLayout = rowLayout;
this.inflater = context.getLayoutInflater();
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
String name = cursor.getString(cursor.getColumnIndex("name"));
TextView nameLabel = (TextView) view.findViewById(R.id.tvProductName);
nameLabel.setText(name);
BigDecimal price = CurrencyHelper.prepareForUsage(cursor.getInt(cursor.getColumnIndex("price")));
TextView priceLabel = (TextView) view.findViewById(R.id.tvProductPrice);
priceLabel.setText(new CurrencyFormat().format(price));
String path = cursor.getString(cursor.getColumnIndex("imagePath"));
ImageView image = (ImageView) view.findViewById(R.id.ivProductImage);
if (path != null) {
ImageLoader.getInstance().displayImage("file://" + path, image);
} else {
image.setImageBitmap(null);
}
Integer id = cursor.getInt(cursor.getColumnIndex("_id"));
view.setTag(id);
}
@Override
public View newView(Context arg0, Cursor arg1, ViewGroup arg2) {
return inflater.inflate(rowLayout, null);
}
} |
@Grom-S This is because you set null-Bitmap yourself. So use |
@nostra13 sorry, haven't thought about that. thanks a lot. |
Hey! Note : This issue gets replicated even in the Demo shared with the package. http://wrong.site.com/corruptedLink http://wrong.site.com/corruptedLink http://wrong.site.com/corruptedLink Please Help. Thanks in advance. |
First of all, many thanks for the development of this really nice library :)
It seems that I'm experiencing the same problem.
I have like a twitter feed inside my app that displays the picture of the sender, which is loaded using AUIL. I don't know why but the first picture is oftenly not the good one but one of another user (displayed under in the list). I'm using loadermanager with an ImageViewBinder. If I just scroll a little bit down then up to re-display the wrongly image, it becames to be the good one !
Here are my params :
Used in the bindView() method :
This is initialized in the Application entry point.
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: