sephiroth74/HorizontalVariableListView

Bug: dividerWidth sets the divider to be shown even for the left side of the first item and for the right side of the last one

AndroidDeveloperLB opened this issue · 3 comments

When I use dividerWidth , I expect it to work only between items, and not on the edges.

Please fix it.
If I would want to add dividers on the left edge and on the right edge, I would have used header and footer.

daj commented

I don't see this problem with the demo app when setting app:hlv_dividerWidth="15dp" in my layout file. The divider appears between all items, but not at the edges. Perhaps you have an extra padding or margin that is affecting your layout?

I had the same issue, the problem is that if you do it programmatically, it doesn't work fine.

I have the same issue and I suppose that here the problem is with total width of the view.
In my case I use "wrap_content" as width of the list view.
If I don't set any dividerWidth, the listView doesn't scroll (because it's smaller than its container) and the behaviour its perfect.
If I set dividerWidth = "20dp" , the total width of the listView remains the same so it scrolls, but inside its bounds! That's because now the listView has an extra margin of 20dp between two items, but I think that the total amount of width remains the same. The result is that when you scroll right or left , the edges are gettin hidden by the bounds.