How to remove the default space coming in front of the gallery view in android using xml coding

354 Views Asked by At

There I am using the gallery view for the dynamic rendering of the images, but there is a default space coming in front and end of the gallery view. Is there is any way to remove the space?

here is my coding

                       <LinearLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        android:background="@color/scrollimagebgcol"
                        android:paddingTop="20dp"
                        android:paddingBottom="20dp">


                        <Gallery
                            android:id="@+id/gallery1"
                            android:layout_width="fill_parent"
                            android:layout_height="fill_parent"
                            android:spacing="15dp"
                            />


                    </LinearLayout>
1

There are 1 best solutions below

8
On

Just remove the padding in the parent LinearLayout, both topPadding and bottomPadding.