I have listview with custom cursoradapter. It contains few hundred of items. Scrolling down is smooth and fast but scrolling back - up is freezing all the time. I don't load image or some operation on UI thread. Only get few values from cursor and set it into textviews
private class EpisodesAdapter extends CursorAdapter {
LayoutInflater inflater;
public EpisodesAdapter(Context context) {
super(context, null, false);
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
View view = inflater.inflate(R.layout.list_item_episode, parent, false);
view.setBackgroundResource(R.drawable.abs__list_selector_holo_light);
return view;
}
@Override
public void bindView(View view, final Context context, final Cursor cursor) {
final String title = cursor.getString(EpisodesQuery.EPISODE_TITLE);
final String episodeId = cursor.getString(EpisodesQuery.EPISODE_ID);
final String time = cursor.getString(EpisodesQuery.EPISODE_PUBLISHED_AT);
final String episodeUrl = cursor.getString(EpisodesQuery.EPISODE_URL);
final int stateId = cursor.getInt(EpisodesQuery.EPISODE_STATE_ID);
((TextView) view.findViewById(R.id.title)).setText(title);
......
}
}
Some thoughts what can be causing this problem?