Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

放在NestedScrollView或ScrollView 左右滑动都会卡顿 #13

Open
shunanlove opened this issue Jan 15, 2019 · 4 comments
Open

放在NestedScrollView或ScrollView 左右滑动都会卡顿 #13

shunanlove opened this issue Jan 15, 2019 · 4 comments

Comments

@shunanlove
Copy link

No description provided.

@qq451682583
Copy link

kLineChartView.setOnTouchListener{ v, event ->
if (event.action == MotionEvent.ACTION_UP || event.action == MotionEvent.ACTION_CANCEL) {
scrollview.requestDisallowInterceptTouchEvent(false)
}else if(event.action == MotionEvent.ACTION_MOVE ){
if(kLineChartView.isLongPress) {
scrollview.requestDisallowInterceptTouchEvent(true)
}
}
false
}

@sg552
Copy link

sg552 commented Jan 30, 2020

上面的是kotlin的代码吧? 能否格式化一下?

@hyy920109
Copy link

你这个是对longPress的优化把
@qq451682583

@huangShan-gitHub
Copy link

//NestedScrollView嵌套,K线图滑动冲突
kLineChartView.setOnTouchListener(new View.OnTouchListener() {
@OverRide
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) {
bsvScrollView.requestDisallowInterceptTouchEvent(false);
} else if (event.getAction() == MotionEvent.ACTION_MOVE) {
bsvScrollView.requestDisallowInterceptTouchEvent(true);
}
return false;
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants