HorizontalVariableListView icon indicating copy to clipboard operation
HorizontalVariableListView copied to clipboard

Add HListView left padding ?

Open codepixely opened this issue 11 years ago • 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

codepixely avatar Feb 18 '14 20:02 codepixely

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

codepixely avatar Feb 18 '14 21:02 codepixely

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

ohdonpiano avatar Feb 26 '14 08:02 ohdonpiano

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

alexoro avatar Oct 27 '14 10:10 alexoro

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.

daj avatar Dec 24 '14 01:12 daj