Code example for ListView

Methods: getContext

     * @param listView The list view whose items should be dismissable. 
     * @param callback The callback to trigger when the user has indicated that she would like to 
     *                 dismiss one or more list items. 
    public SwipeDismissListViewTouchListener(ListView listView, OnDismissCallback callback) {
        ViewConfiguration vc = ViewConfiguration.get(listView.getContext());
        mSlop = vc.getScaledTouchSlop();
        mMinFlingVelocity = vc.getScaledMinimumFlingVelocity();
        mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity();
        mAnimationTime = listView.getContext().getResources().getInteger(
        mListView = listView;
        mCallback = callback;
     * Enables or disables (pauses or resumes) watching for swipe-to-dismiss gestures. 
     * @param enabled Whether or not to watch for gestures. 
    public void setEnabled(boolean enabled) {