public SwipeActionAdapter setListView ( ListView listView ) { this . mListView = listView ; mTouchListener = new SwipeActionTouchListener ( listView , this ) ; this . mListView . setOnTouchListener ( mTouchListener ) ; this . mListView . setOnScrollListener ( mTouchListener . makeScrollListener ( ) ) ; this . mListView . setClipChildren ( false ) ; mTouchListener . setFadeOut ( mFadeOut ) ; mTouchListener . setDimBackgrounds ( mDimBackgrounds ) ; mTouchListener . setFixedBackgrounds ( mFixedBackgrounds ) ; mTouchListener . setNormalSwipeFraction ( mNormalSwipeFraction ) ; mTouchListener . setFarSwipeFraction ( mFarSwipeFraction ) ; return this ; }
We need the ListView to be able to modify it s OnTouchListener