Issue with addHeaderView and missing list separator

老子叫甜甜 提交于 2019-12-11 03:16:33

问题


I'm using

mList.addHeaderView(mHeader, null, false);

in Android add an (unselectable) header to my list. When the list is rendered the header isn't selectable however the list separator (the line) between the bottom of the header and first list item is missing. Does anyone know a workaround for this issue?


回答1:


Try

mList.addHeaderView(mHeader)

In you onItemClick method take in consideration the extra index.



来源:https://stackoverflow.com/questions/14367278/issue-with-addheaderview-and-missing-list-separator

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