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() . 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
Source File: FlatPlayerFragment.java    From Music-Player with GNU General Public License v3.0 6 votes vote down vote up
@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 2
Source File: CardPlayerFragment.java    From Phonograph with GNU General Public License v3.0 6 votes vote down vote up
@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 File: FlatPlayerFragment.java    From Phonograph with GNU General Public License v3.0 6 votes vote down vote up
@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 4
Source File: PlaylistDetailActivity.java    From VinylMusicPlayer with GNU General Public License v3.0 6 votes vote down vote up
@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
Source File: PlaylistDetailActivity.java    From Phonograph with GNU General Public License v3.0 6 votes vote down vote up
@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 6
Source File: PlayingQueueFragment.java    From RetroMusicPlayer with GNU General Public License v3.0 6 votes vote down vote up
@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 7
Source File: PlaylistDetailActivity.java    From Orin with GNU General Public License v3.0 6 votes vote down vote up
@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
Source File: CardPlayerFragment.java    From Orin with GNU General Public License v3.0 6 votes vote down vote up
@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 9
Source File: FlatPlayerFragment.java    From Orin with GNU General Public License v3.0 6 votes vote down vote up
@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 10
Source File: PlaylistDetailActivity.java    From Music-Player with GNU General Public License v3.0 6 votes vote down vote up
@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
Source File: MyTaskFragment.java    From Conquer with 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 12
Source File: LightsNSwitchesDevicesFragment.java    From arcusandroid with Apache License 2.0 6 votes vote down vote up
@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 13
Source File: GenreDetailActivity.java    From Music-Player with GNU General Public License v3.0 5 votes vote down vote up
@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
Source File: IsotopesFragment.java    From android-periodic-table with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onDestroyView() {
    if (mRecyclerViewExpandableItemManager != null) {
        mRecyclerViewExpandableItemManager.release();
    }

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

    super.onDestroyView();
}
 
Example 15
Source File: GenreDetailActivity.java    From VinylMusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
@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 File: PermissionGroupActivity.java    From AppOpsX with 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 File: RecordActivity.java    From Nimingban with 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 File: DraftActivity.java    From Nimingban with 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 File: SortForumsActivity.java    From Nimingban with 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 File: FeedActivity.java    From Nimingban with 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();
}