7

I wish to keep different colors for the divider and background in my GridView. Or I would like to hide the background color visible around the Gridview. I tried changing layout_margin & padding parameters, but that did not change anything. Following is the xml layout for my GridView.

<GridView android:id="@+id/gvFree" 
           android:layout_width="fill_parent"
           android:layout_height="0dp" android:layout_weight="1"
           android:columnWidth="@dimen/grid_col_wd"
           android:background="@android:color/darker_gray"
           android:layout_margin="-5dp"
           android:padding="-5dp"
           android:numColumns="auto_fit"
           android:stretchMode="columnWidth"
           android:gravity="fill"
           android:horizontalSpacing="2dp"
           android:verticalSpacing="2dp"
           ></GridView>

Kindly help.

image

Community
  • 1
  • 1
ambit
  • 1,099
  • 2
  • 28
  • 43

0 Answers0