I have a simple layout with a recycler. I feed it with Adapter and set GridLayoutManager for the recycler.
<android.support.v7.widget.RecyclerView android:id="@+id/scripts_recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginBottom="50dp" android:verticalSpacing="20dp" android:clipToPadding="false" android:orientation="vertical" app:layoutManager="android.support.v7.widget.GridLayoutManager" tools:listitem="@layout/tmpl_script" android:paddingBottom="20dp" android:layout_marginEnd="20dp" android:layout_marginRight="20dp" android:paddingTop="30dp" app:layout_gravity="center" /> Activity
RecyclerView recyclerView = (RecyclerView)findViewById(R.id.scripts_recycler_view); recyclerView.setAdapter(adapter); int columns = getResources().getInteger(R.integer.scripts_columns); recyclerView.setLayoutManager(new GridLayoutManager(this, columns)); recyclerView.setHasFixedSize(true); Item
<LinearLayout android:layout_width="300dp" android:layout_height="300dp" android:background="@drawable/game_border" android:gravity="center" android:orientation="vertical"> I have two problems:
- there is no space between rows
- items are not centered within the row
I tried all properties in Android Studio but they do not have any effect. I googled, opened many questions but I still have no luck. What magic property shall I use?
As you can see items are positioned on left side of the screen. I want to move it to center. And there is no space between first and second row.

