Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Padding bars remain when scrolling GridView

Tags:

android

I have this GridView (see screenshot) that contains items that all need about 12 dip spacing. However, when I set padding on the GridView, it seems that I can't scroll across this paddingm which I do want to do. How do I achieve this?

Note the slice of space above the top two pictures that I want to scroll away from:

screenshot while scrolling

Code:

<GridView
    android:id="@+id/feed_grid"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:columnWidth="96dp"
    android:gravity="center"
    android:horizontalSpacing="@dimen/grid_view_margins"
    android:numColumns="auto_fit"
    android:padding="@dimen/grid_view_margins"
    android:stretchMode="columnWidth"
    android:scrollbarStyle="outsideInset"
    android:verticalSpacing="@dimen/grid_view_margins" />
like image 573
Maarten Avatar asked Apr 05 '13 22:04

Maarten


1 Answers

android:clipToPadding="false" will solve your purpose

like image 186
Shashank Tomar Avatar answered Nov 08 '22 18:11

Shashank Tomar