use of com.dante.custom.TouchImageView in project 91Pop by DanteAndroid.
the class PictureAdapter method destroyItem.
@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
FrameLayout view = (FrameLayout) object;
for (int i = 0; i < view.getChildCount(); i++) {
View childView = view.getChildAt(i);
if (childView instanceof TouchImageView) {
childView.setOnClickListener(null);
childView.setOnLongClickListener(null);
GlideApp.with(container).clear(childView);
view.removeViewAt(i);
Logger.t(TAG).d("clean photoView");
}
}
container.removeView(view);
Logger.t(TAG).d("destroyItem");
}
Aggregations