public void switchItem(@Nullable RecyclerView recyclerView,final int selectedViewPosition){
  if (isDeselectAnimationInProcess || isSelectAnimationInProcess || isViewCollapsing|| isWaitingToDeselectAnimation|| isWaitingToSelectAnimation|| isSelectedItemStraightened) {
    return;
  }
  if (recyclerView != null) {
    if (this.selectedItemPosition != RecyclerView.NO_POSITION && this.selectedItemPosition != selectedViewPosition) {
      deselectItem(recyclerView,this.selectedItemPosition,selectedViewPosition,0);
      return;
    }
    smoothScrollToPosition(recyclerView,null,selectedViewPosition);
  }
}

public void switchItem ( @ Nullable RecyclerView recyclerView , final int selectedViewPosition ) { if ( isDeselectAnimationInProcess || isSelectAnimationInProcess || isViewCollapsing || isWaitingToDeselectAnimation || isWaitingToSelectAnimation || isSelectedItemStraightened ) { return ; } if ( recyclerView != null ) { if ( this . selectedItemPosition != RecyclerView . NO_POSITION && this . selectedItemPosition != selectedViewPosition ) { deselectItem ( recyclerView , this . selectedItemPosition , selectedViewPosition , 0 ) ; return ; } smoothScrollToPosition ( recyclerView , null , selectedViewPosition ) ; } }
method change item state from close to open and open to close ( switch state )
