I have a layout that is inflated in an activity. Now all the info are displayed in vertical as shown in the following. this is how it looks now
but what I want it to be is three textView should come horizontal and then next three should come as a next row and so on. I have posted the way it should look at bottom.this is how I want it to look like
this is the layout that has recyclerview
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_my_groups"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
app:reverseLayout="true"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:visibility="gone"
android:onClick="onOutsideClick"
android:orientation="vertical"
app:layoutManager="android.support.v7.widget.StaggeredGridLayoutManager"
app:layout_constraintTop_toBottomOf="@id/rv_selected_groups" />
and the bottom is a separate layout with just a textView that I am using to inflate.
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_group_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp"
android:background="@drawable/chip_drawable"
android:fontFamily="sans-serif-condensed"
android:gravity="center"
android:textAllCaps="false"
android:textColor="@android:color/black"
android:textSize="14sp" />
and the kotlin activity where I have inflated the layout
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GroupsViewHolder {
val view = LayoutInflater.from(parent.context).inflate(R.layout.groups_item_row, parent, false)
return GroupsViewHolder(view)
}
sorry if my code is not sufficient.
Required output
Is there any way that I could implement that

