今天写代码的时候,就怎么都想不起来spanCount这个参数了,只好看原来的老代码。那就本着好脑子不如烂笔头的思想记下,能帮人最好。
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
app:layout_constraintTop_toBottomOf="@id/fgV3"
app:layout_constraintBottom_toBottomOf="parent"
app:layoutManager="android.support.v7.widget.GridLayoutManager"设置管理器
app:spanCount="2" 设置显示一行几列
android:layout_height="0dp">