Hallo ich habe eine Gridview mit mehreren Elementen. Ich habe versucht, Platz auf den Elementen oben und unten hinzuzufügen, aber ich kann es nicht schaffen. Auch die Gegenstände in der letzten Reihe zeigen nicht gut.GridView Abstand
FragmentLayout
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/Overlay"
app:theme="@style/AppTheme"/>
</android.support.design.widget.AppBarLayout>
<GridView
android:fitsSystemWindows="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/gridView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:columnWidth="100dp"
android:drawSelectorOnTop="true"
android:gravity="center"
android:numColumns="auto_fit"
android:stretchMode="spacingWidthUniform"
android:verticalSpacing="5dp"
android:focusable="true"
android:layout_below="@+id/widget"
android:clickable="true"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_add_black_24dp"/>
</android.support.design.widget.CoordinatorLayout>
Grid Artikel
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:padding="10dp"
android:id="@+id/image"
android:layout_width="105dp"
android:layout_height="100dp"
android:src="@drawable/active"/>
<TextView
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:gravity="center"
android:text="hello"
android:textSize="14sp" />
</LinearLayout>
No top Abstand
Kein Bodenabstand. Row ist voll shoing
auf Ihrem 'Adapter' nach dem ersten und letzten Punkt suchen. Wenn einer von ihnen Polsterung einstellen. – hrskrs