Android: Horizontal list view in vertical scroll view?

拜拜、爱过 提交于 2019-11-30 12:37:21

问题


I want to make the same implementation a pulse application.

Horizontal list view inside a vertical list view.

i tried this project for horizontal list view, but when i am trying to scroll horizontal the vertical scroll active and the list is goes up and down. how can i prevent this issues.


回答1:


It would be much easier if you paste your piece of code with your question, allowing to see why it goes wrong. My best guess without this information is to check you usage of fill_parent vs wrap_content.




回答2:


it's work on my app...

just like pulse app... horizontallistview inside vertical listview

this is the solution...

just put this code in u'r onscroll of HorizontalListview class...

ViewParent viewParent = getParent();

if (viewParent != null) {

    viewParent.requestDisallowInterceptTouchEvent(true);

}



回答3:


i think you should use some horizontal scrollviews in a vertical scrollview. and in each horizontal scrollview, you can give listview, gridview, etc... if you want. I think it's better solution for this problem. :)



来源:https://stackoverflow.com/questions/11775677/android-horizontal-list-view-in-vertical-scroll-view

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