Prevent swipe refresh when moving tasks

pull/253/head
Alex Baker 10 years ago
parent 56613cafe2
commit d20e9f4d8e

@ -0,0 +1,27 @@
package org.tasks.ui;
import android.content.Context;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.AttributeSet;
import android.view.MotionEvent;
import com.todoroo.astrid.utility.Flags;
public class DraggableSwipeRefreshLayout extends SwipeRefreshLayout {
public DraggableSwipeRefreshLayout(Context context) {
super(context);
}
public DraggableSwipeRefreshLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (Flags.check(Flags.TLFP_NO_INTERCEPT_TOUCH)) {
return false;
}
return super.onInterceptTouchEvent(ev);
}
}

@ -3,7 +3,7 @@
android:layout_height="match_parent"
android:layout_weight="100">
<android.support.v4.widget.SwipeRefreshLayout
<org.tasks.ui.DraggableSwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
@ -17,7 +17,7 @@
android:paddingBottom="104dp"
android:clipToPadding="false" />
</android.support.v4.widget.SwipeRefreshLayout>
</org.tasks.ui.DraggableSwipeRefreshLayout>
<include layout="@layout/task_list_swipe_layout_empty" />

Loading…
Cancel
Save