游戏详情游戏详细信息显示问题
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user