StackView 및 AdapterViewAnimator를 연구 중입니다. AdapterViewAnimator에서 은 아이들을 직접 제거하지 않지만 아이들은 배열에 넣고 그리고 다음 단계에서 제거합니다.AdapterViewAnimator가 2 단계에서 하위 항목을 제거하는 이유는 무엇입니까?
누군가이 디자인의 이유를 설명해 주시겠습니까? 왜 나는 그들을 직접 제거 할 수 없습니까?
자세한 내용은 : 는 또한 인해 위의 디자인, (AdapterViewAnimator를 확장) StackView 은 ... 어떤 아이가 남아 이 나를 싶어 이유를 물어 발생할 것으로 나타났습니다.
자세한 내용은 : (AdapterViewAnimator.showOnly에서 (INT, 부울))
// This section clears out any items that are in our active views list
// but are outside the effective bounds of our window (this is becomes an issue
// at the extremities of the list, eg. where newWindowStartUnbounded < 0 or
// newWindowEndUnbounded > adapterCount - 1
for (Integer index : mViewsMap.keySet()) {
boolean remove = false;
if (!wrap && (index < rangeStart || index > rangeEnd)) {
remove = true;
} else if (wrap && (index > rangeEnd && index < rangeStart)) {
remove = true;
}
if (remove) {
View previousView = mViewsMap.get(index).view;
int oldRelativeIndex = mViewsMap.get(index).relativeIndex;
mPreviousViews.add(index);
transformViewForTransition(oldRelativeIndex, -1, previousView, animate);
}
}
감사 : 아래 제가 위에서 언급 한 코드이다. BR, 헨리