Search in sources :

Example 1 with TouchImageView

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");
}
Also used : FrameLayout(android.widget.FrameLayout) TouchImageView(com.dante.custom.TouchImageView) TouchImageView(com.dante.custom.TouchImageView) PhotoView(com.github.chrisbanes.photoview.PhotoView) View(android.view.View)

Aggregations

View (android.view.View)1 FrameLayout (android.widget.FrameLayout)1 TouchImageView (com.dante.custom.TouchImageView)1 PhotoView (com.github.chrisbanes.photoview.PhotoView)1