Merge "QS: Followup to scroll fixes" into nyc-dev am: 1ceef7c0fa
am: 947ef9a717
* commit '947ef9a7171fa0750cf3c027a2cb487f827cff06':
QS: Followup to scroll fixes
Change-Id: I62212b21a330db50aaa8a2923bf753e980f931cf
This commit is contained in:
@@ -24,8 +24,6 @@ import android.widget.ScrollView;
|
|||||||
*/
|
*/
|
||||||
public class NonInterceptingScrollView extends ScrollView {
|
public class NonInterceptingScrollView extends ScrollView {
|
||||||
|
|
||||||
private float mInitialY;
|
|
||||||
|
|
||||||
public NonInterceptingScrollView(Context context, AttributeSet attrs) {
|
public NonInterceptingScrollView(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
}
|
}
|
||||||
@@ -35,14 +33,7 @@ public class NonInterceptingScrollView extends ScrollView {
|
|||||||
int action = ev.getActionMasked();
|
int action = ev.getActionMasked();
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case MotionEvent.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
mInitialY = ev.getY();
|
if (canScrollVertically(1)) {
|
||||||
break;
|
|
||||||
case MotionEvent.ACTION_UP:
|
|
||||||
case MotionEvent.ACTION_CANCEL:
|
|
||||||
requestDisallowInterceptTouchEvent(false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (canScrollVertically(ev.getY() > mInitialY ? -1 : 1)) {
|
|
||||||
requestDisallowInterceptTouchEvent(true);
|
requestDisallowInterceptTouchEvent(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user