Code example for ListView

Methods: getContext

0
	 * @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(android.R.integer.config_shortAnimTime);
		mListView = listView;
		mCallback = callback;
	} 
 
	@Override 
	public boolean onTouch(View view, MotionEvent motionEvent) {
		if (mViewWidth < 2) {
			mViewWidth = mListView.getWidth();
		} 
 
		switch (motionEvent.getActionMasked()) {