Code example for ListView

Methods: getContext

0
	 *            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(android.R.integer.config_shortAnimTime);
		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.