Answers for "how to set number of columns in recyclerview android"

1

how to set number of columns in recyclerview android

recyclerView.setLayoutManager(new GridLayoutManager(this, 2));
Posted by: Guest on November-14-2020
-1

how to set number of columns in recyclerview android

.//Add in recyclerView widget in xml file
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"
Posted by: Guest on November-14-2020

Code answers related to "how to set number of columns in recyclerview android"

Browse Popular Code Answers by Language