public View . OnLongClickListener getOnLongClickListener ( boolean adapterHasListener ) { if ( isLongClickable ( ) && adapterHasListener ) { if ( mViewHolderLongClickListener == null ) { mViewHolderLongClickListener = new ViewHolderLongClickListener <> ( this ) ; } } else { mViewHolderLongClickListener = null ; } return mViewHolderLongClickListener ; }
Get the OnLongClickListener to call when the user long - click on the item .