sephiroth74 / HorizontalVariableListView

Horizontal list view for Android which allows variable items widths
859 stars 283 forks source link

paddingLeft and paddingRight cause issues with overscroll "glow" #80

Open gbourassa opened 10 years ago

gbourassa commented 10 years ago

When adding paddingLeft to the HListView, the blue overscroll glow at the right end of the list will be shifted up. Adding paddingRight will cause the right end glow to be shifted up the same way, but less. The left side glow is never affected by this.

Using your demo project, here is an example with leftPadding:

<it.sephiroth.android.library.widget.HListView
            android:id="@+id/hListView1"
            android:layout_width="match_parent"
            android:layout_height="200dip"
            android:paddingLeft="50dp"
            android:paddingTop="20dip"
            android:paddingBottom="20dip"
            android:background="#11000000" />

droid screen-3

Another example using right padding

<it.sephiroth.android.library.widget.HListView
            android:id="@+id/hListView1"
            android:layout_width="match_parent"
            android:layout_height="200dip"
            android:paddingRight="50dp"
            android:paddingTop="20dip"
            android:paddingBottom="20dip"
            android:background="#11000000" />

droid screen-4

There is probably an issue related to the way the standard ListView handles overscroll (uses left and right padding to display glow only within the padding bounds).

Thanks