-
Notifications
You must be signed in to change notification settings - Fork 306
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
CustScrollView嵌套CustListView无法正常滑动 #24
Comments
你这样写,完全禁止了ListView的懒加载功能,违背了ListView的设计初衷。你想要一次性加载,可以直接LinearLayout.addView取代ListView了。 |
如果你外层用了CustScrollView,里面就不要用CustListView了。你自己定义一个ListVIew,不做任何touch分发拦截,onMeasure按你的样子写,CustScrollView一样可以正常工作的。 之所以不能正常工作了,是因为CustScrollVIew和CustListView对Touch的处理已经混乱了 |
@xmuSistone 谢谢指点 |
@xmuSistone 我自定义了一个ListView,然后在dispatchTouchEvent中return false,但是依然无法正常工作。请问能否给出关键代码,对事件分发不是特别理解,惭愧! |
直接用custlistview就好 |
目前外层是一个CustScrollView,内层包含好几个ListView和其他非滑动控件,不考虑懒加载。直接使用custListView不满足需求,且改成LinearLayout.addView的方式工作量较大,实在不知如何解决了。 |
你好,很喜欢这个组件,但在使用中遇到一些问题
现有Fragment1跟Fragment2,在Fragment2中使用CustScrollView嵌套了CustListView
且复写了CustListView的如下方法
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, expandSpec); }
然后,就无法正常滑动了,请问该如何解决
The text was updated successfully, but these errors were encountered: