Java Code Examples for com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils#releaseAll()

The following examples show how to use com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils#releaseAll() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public void onPause () {
    super.onPause();

    if (mRecyclerViewDragDropManager != null) {
        mRecyclerViewDragDropManager.cancelDrag();
        mRecyclerViewDragDropManager.release();
        mRecyclerViewDragDropManager = null;
    }

    if (deviceList != null) {
        deviceList.setItemAnimator(null);
        deviceList.setAdapter(null);
    }

    if (wrappedDeviceListAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedDeviceListAdapter);
        wrappedDeviceListAdapter = null;
    }

    deviceListAdapter = null;
}
 
Example 2
@Override
public void onDestroyView() {
    if (slidingUpPanelLayout != null) {
        slidingUpPanelLayout.removePanelSlideListener(this);
    }
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    playingQueueAdapter = null;
    layoutManager = null;
    super.onDestroyView();
    unbinder.unbind();
}
 
Example 3
Source Project: Conquer   File: MyTaskFragment.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void onDestroyView() {
    if (mRecyclerViewDragDropManager != null) {
        mRecyclerViewDragDropManager.release();
        mRecyclerViewDragDropManager = null;
    }
    if (mRecyclerViewSwipeManager != null) {
        mRecyclerViewSwipeManager.release();
        mRecyclerViewSwipeManager = null;
    }

    if (mRecyclerView != null) {
        mRecyclerView.setItemAnimator(null);
        mRecyclerView.setAdapter(null);
        mRecyclerView = null;
    }

    if (mWrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(mWrappedAdapter);
        mWrappedAdapter = null;
    }
    mAdapter = null;
    mLayoutManager = null;

    super.onDestroyView();
}
 
Example 4
@Override
protected void onDestroy() {
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    adapter = null;

    super.onDestroy();
}
 
Example 5
@Override
public void onDestroyView() {
    if (slidingUpPanelLayout != null) {
        slidingUpPanelLayout.removePanelSlideListener(this);
    }
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    playingQueueAdapter = null;
    layoutManager = null;
    super.onDestroyView();
    unbinder.unbind();
}
 
Example 6
@Override
public void onDestroyView() {
    if (slidingUpPanelLayout != null) {
        slidingUpPanelLayout.removePanelSlideListener(this);
    }
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    playingQueueAdapter = null;
    layoutManager = null;
    super.onDestroyView();
    unbinder.unbind();
}
 
Example 7
@Override
protected void onDestroy() {
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    adapter = null;

    super.onDestroy();
}
 
Example 8
@Override
public void onDestroyView() {
    if (mRecyclerViewDragDropManager != null) {
        mRecyclerViewDragDropManager.release();
        mRecyclerViewDragDropManager = null;
    }

    if (mRecyclerView != null) {
        mRecyclerView.setItemAnimator(null);
        mRecyclerView.setAdapter(null);
        mRecyclerView = null;
    }

    if (mWrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(mWrappedAdapter);
        mWrappedAdapter = null;
    }
    mPlayingQueueAdapter = null;
    mLayoutManager = null;
    super.onDestroyView();
    unbinder.unbind();
}
 
Example 9
@Override
protected void onDestroy() {
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    adapter = null;

    super.onDestroy();
}
 
Example 10
@Override
protected void onDestroy() {
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    adapter = null;

    super.onDestroy();
}
 
Example 11
@Override
public void onDestroyView() {
    if (slidingUpPanelLayout != null) {
        slidingUpPanelLayout.removePanelSlideListener(this);
    }
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    playingQueueAdapter = null;
    layoutManager = null;
    super.onDestroyView();
    unbinder.unbind();
}
 
Example 12
@Override
public void onDestroyView() {
    if (slidingUpPanelLayout != null) {
        slidingUpPanelLayout.removePanelSlideListener(this);
    }
    if (recyclerViewDragDropManager != null) {
        recyclerViewDragDropManager.release();
        recyclerViewDragDropManager = null;
    }

    if (recyclerView != null) {
        recyclerView.setItemAnimator(null);
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    playingQueueAdapter = null;
    layoutManager = null;
    super.onDestroyView();
    unbinder.unbind();
}
 
Example 13
@Override
protected void onDestroy() {
    if (recyclerView != null) {
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    adapter = null;

    super.onDestroy();
}
 
Example 14
@Override
public void onDestroyView() {
    if (mRecyclerViewExpandableItemManager != null) {
        mRecyclerViewExpandableItemManager.release();
    }

    if (mWrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(mWrappedAdapter);
    }

    super.onDestroyView();
}
 
Example 15
@Override
protected void onDestroy() {
    if (recyclerView != null) {
        recyclerView.setAdapter(null);
        recyclerView = null;
    }

    if (wrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(wrappedAdapter);
        wrappedAdapter = null;
    }
    adapter = null;

    super.onDestroy();
}
 
Example 16
Source Project: AppOpsX   File: PermissionGroupActivity.java    License: MIT License 5 votes vote down vote up
@Override
protected void onDestroy() {
  super.onDestroy();
  if(mPresenter != null){
    mPresenter.destroy();
  }

  if(stickyHelper != null) {
    stickyHelper.release();
  }

  if (mRecyclerViewExpandableItemManager != null) {
    mRecyclerViewExpandableItemManager.release();
    mRecyclerViewExpandableItemManager = null;
  }

  if (recyclerView != null) {
    recyclerView.setItemAnimator(null);
    recyclerView.setAdapter(null);
    recyclerView = null;
  }

  if (mWrappedAdapter != null) {
    WrapperAdapterUtils.releaseAll(mWrappedAdapter);
    mWrappedAdapter = null;
  }
  mLayoutManager = null;
}
 
Example 17
Source Project: Nimingban   File: RecordActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();

    Messenger.getInstance().unregister(Constants.MESSENGER_ID_UPDATE_RECORD, this);

    if (mRecyclerViewSwipeManager != null) {
        mRecyclerViewSwipeManager.release();
        mRecyclerViewSwipeManager = null;
    }

    if (mRecyclerViewTouchActionGuardManager != null) {
        mRecyclerViewTouchActionGuardManager.release();
        mRecyclerViewTouchActionGuardManager = null;
    }

    if (mRecyclerView != null) {
        mRecyclerView.setItemAnimator(null);
        mRecyclerView.setAdapter(null);
        mRecyclerView = null;
    }

    if (mWrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(mWrappedAdapter);
        mWrappedAdapter = null;
    }
    mAdapter = null;

    if (mLazyList != null) {
        mLazyList.close();
    }

    for (WeakReference<LoadImageView> ref : mLoadImageViewSet) {
        LoadImageView liv = ref.get();
        if (liv != null) {
            liv.unload();
        }
    }
    mLoadImageViewSet.clear();
}
 
Example 18
Source Project: Nimingban   File: DraftActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();

    if (mRecyclerViewSwipeManager != null) {
        mRecyclerViewSwipeManager.release();
        mRecyclerViewSwipeManager = null;
    }

    if (mRecyclerViewTouchActionGuardManager != null) {
        mRecyclerViewTouchActionGuardManager.release();
        mRecyclerViewTouchActionGuardManager = null;
    }

    if (mRecyclerView != null) {
        mRecyclerView.setItemAnimator(null);
        mRecyclerView.setAdapter(null);
        mRecyclerView = null;
    }

    if (mWrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(mWrappedAdapter);
        mWrappedAdapter = null;
    }
    mAdapter = null;
    mLayoutManager = null;

    if (mLazyList != null) {
        mLazyList.close();
    }
}
 
Example 19
Source Project: Nimingban   File: SortForumsActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();

    if (mRecyclerViewDragDropManager != null) {
        mRecyclerViewDragDropManager.release();
        mRecyclerViewDragDropManager = null;
    }

    if (mRecyclerViewTouchActionGuardManager != null) {
        mRecyclerViewTouchActionGuardManager.release();
        mRecyclerViewTouchActionGuardManager = null;
    }

    if (mRecyclerView != null) {
        mRecyclerView.setItemAnimator(null);
        mRecyclerView.setAdapter(null);
        mRecyclerView = null;
    }

    if (mWrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(mWrappedAdapter);
        mWrappedAdapter = null;
    }
    mAdapter = null;
    mLayoutManager = null;

    if (mLazyList != null) {
        mLazyList.close();
        mForumNames.clear();
    }

    if (mNMBRequest != null) {
        mNMBRequest.cancel();
        mNMBRequest = null;
    }
}
 
Example 20
Source Project: Nimingban   File: FeedActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected void onDestroy() {
    super.onDestroy();

    Messenger.getInstance().unregister(Constants.MESSENGER_ID_FAST_SCROLLER, this);

    if (mRecyclerViewSwipeManager != null) {
        mRecyclerViewSwipeManager.release();
        mRecyclerViewSwipeManager = null;
    }

    if (mRecyclerViewTouchActionGuardManager != null) {
        mRecyclerViewTouchActionGuardManager.release();
        mRecyclerViewTouchActionGuardManager = null;
    }

    if (mOnScrollListener != null) {
        mRecyclerView.removeOnScrollListener(mOnScrollListener);
        mOnScrollListener = null;
    }

    if (mRecyclerView != null) {
        mRecyclerView.setItemAnimator(null);
        mRecyclerView.setAdapter(null);
        mRecyclerView = null;
    }

    if (mWrappedAdapter != null) {
        WrapperAdapterUtils.releaseAll(mWrappedAdapter);
        mWrappedAdapter = null;
    }
    mAdapter = null;

    if (mNMBRequest != null) {
        mNMBRequest.cancel();
        mNMBRequest = null;
    }

    for (WeakReference<FeedHolder> ref : mHolderList) {
        FeedHolder holder = ref.get();
        if (holder != null) {
            holder.thumb.unload();
        }
    }
    mHolderList.clear();
}