How to change space between rows in FlexboxLayoutManager?

160 views Asked by At

I'm using FlexboxLayoutManager.

How to change space between rows, and space between items on the first row? enter image description here

class FlexboxLayoutManagerImpl(context: Context, flexDirection: Int) :
    FlexboxLayoutManager(context, flexDirection) {

    override fun generateLayoutParams(lp: ViewGroup.LayoutParams): RecyclerView.LayoutParams {
        return LayoutParams(lp)
    }
}

And call from my adapter:

contentParent.getChildAt(i).setOnClickListener(v1 -> {
     FlexboxLayoutManagerImpl flexboxLayoutManager = new FlexboxLayoutManagerImpl(context, FlexDirection.ROW);
     holder.recycleListView.setLayoutManager(flexboxLayoutManager);
});
0

There are 0 answers