touch event not working with horizontal list view (devsmart lib)

瘦欲@ 提交于 2019-12-10 21:40:58

问题


I have implemented horizontal list view inside vertical list view using librarty: https://github.com/dinocore1/DevsmartLib-Android.

It is working fine. I have to implement touch listener on list view to manage visibilty of header view (similar to google chrome's android app'd URL bar). Touch listener works normally for list view (if horizontal list view is not inflated in it). But when user touches the list cell having horizontal list view, then touch event is not handled.

I have also noticed that in horizontal list view, on touch is overridden to manage its scroll.

I also tested this on a list view (having no horizontal list view), and it worked fine.

Any help will be highly appreciated.

Thanks


回答1:


This is your solution. You need to override the onTouchEvent() as given in following answer- https://stackoverflow.com/a/7882050/609782



来源:https://stackoverflow.com/questions/22397715/touch-event-not-working-with-horizontal-list-view-devsmart-lib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!