游戏详情游戏详细信息显示问题

This commit is contained in:
张玉久
2020-04-17 18:55:59 +08:00
parent b23d589a29
commit 5bbd23bf33

View File

@ -539,11 +539,16 @@ class DescAdapter(context: Context,
val gridLayoutManager = GridLayoutManager(mContext, 2)
gridLayoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
return if (position == infoAdapter.itemCount - 1) {
2
} else {
return if (infoAdapter.itemCount % 2 == 0) {
1
} else {
if (position == infoAdapter.itemCount - 1) {
2
} else {
1
}
}
}
}
layoutManager = gridLayoutManager