Using BaseAdapter without recycling (inflating views everytime getView(...) is called) my animation and functionality to swipe inside my list item works fine (it also has images thats loading from web).
@Override
public View getView( final int position, View convertView, ViewGroup parent ) {
View view = myViews.get( position );
final Promotion i = getItem( position );
view = a.getLayoutInflater().inflate( R.layout.butik_item, parent, false );
/* More code */
}
}
Experience: Poor performance and scrolling is not smooth, animation + swipe works.
Using BaseAdapter with Recycling (array with views and nullchecks with ViewHolder)
Map<Integer, View> myViews = new HashMap<Integer, View>();
@Override public View getView( int position, View convertView, ViewGroup parent ) {
final ViewHolder holder;
View v = myViews.get( position );
if ( v == null ) {
v = a.getLayoutInflater().inflate( R.layout.butik_item, parent, false );
/* More code */
}
v.setTag( position + "" );
myViews.put( position, v );
}
Experience: Great performance and scrolling is smooth, animations do not work and swipe is veeeery laggy.
What can I do to fix this?