sephiroth74/HorizontalVariableListView

Add HListView left padding ?

Opened this issue · 4 comments

Hello, thank you for your work. It looks very nice. My question is, can the left padding be changed? At the end of the list it's always a distance but on the left it starts from left with no padding or margin

Found this: add how much you want to add, in ABSHListVIew class, line with:
listPadding.left = mSelectionLeftPadding + getPaddingLeft() + 10; // added 10

Hi, I'm also looking for a way to add left empty space before first list element and right empty space after last element in order to center them on screen.

I see two ways: one is to add header and footer views, the other is to alter ABSHListView in order to set the +10 padding space externally.

I think the latter the best. Is there a feature ready we can't see?

Many Thanks,

Daniele

Found another hack/workaround with me co-workee now.
In xml for HListView type next
android:clipChildren="false"
android:paddingLeft="20dp"
android:paddingRight="20dp"
It will give you the required padding before first and last element

daj commented

I tried to add header and footer views to the HListView, but they did not seem to get displayed. In fact, if I added both then my entire HListView disappears! For now I just add the left and right padding to my list items in my adapter.