This commit is contained in:
Alexey Kulish 2016-07-08 18:06:08 +03:00
parent 97aac265ac
commit 4f46daa6be

View file

@ -350,11 +350,11 @@ public class SwipeDismissListViewTouchListener implements View.OnTouchListener {
* dismiss one or more list items. * dismiss one or more list items.
*/ */
public SwipeDismissListViewTouchListener(Context ctx, ListView listView, DismissCallbacks callbacks) { public SwipeDismissListViewTouchListener(Context ctx, ListView listView, DismissCallbacks callbacks) {
ViewConfiguration vc = ViewConfiguration.get(listView.getContext()); ViewConfiguration vc = ViewConfiguration.get(ctx);
mSlop = vc.getScaledTouchSlop(); mSlop = vc.getScaledTouchSlop();
mMinFlingVelocity = vc.getScaledMinimumFlingVelocity() * 16; mMinFlingVelocity = vc.getScaledMinimumFlingVelocity() * 16;
mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity(); mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity();
mAnimationTime = listView.getContext().getResources().getInteger( mAnimationTime = ctx.getResources().getInteger(
android.R.integer.config_shortAnimTime); android.R.integer.config_shortAnimTime);
mListView = listView; mListView = listView;
mCallbacks = callbacks; mCallbacks = callbacks;