Open Voidruiyi opened 7 years ago
bindView(View target, int position) 时, 判断依赖recycle缓存机制 复用存在问题
if (swipeLayout.getTag(resId) == null) { SwipeMemory swipeMemory = new SwipeMemory(position); swipeLayout.addSwipeListener(swipeMemory); swipeLayout.addOnLayoutListener(onLayoutListener); swipeLayout.setTag(resId, new ValueBox(position, swipeMemory, onLayoutListener)); mShownLayouts.add(swipeLayout); } else { ValueBox valueBox = (ValueBox) swipeLayout.getTag(resId); valueBox.swipeMemory.setPosition(position); valueBox.onLayoutListener.setPosition(position); valueBox.position = position; }
bindView(View target, int position) 时, 判断依赖recycle缓存机制 复用存在问题
if (swipeLayout.getTag(resId) == null) { SwipeMemory swipeMemory = new SwipeMemory(position); swipeLayout.addSwipeListener(swipeMemory); swipeLayout.addOnLayoutListener(onLayoutListener); swipeLayout.setTag(resId, new ValueBox(position, swipeMemory, onLayoutListener)); mShownLayouts.add(swipeLayout); } else { ValueBox valueBox = (ValueBox) swipeLayout.getTag(resId); valueBox.swipeMemory.setPosition(position); valueBox.onLayoutListener.setPosition(position); valueBox.position = position; }