N宫格问题#
N宫格问题
当前Value对应的Row 排 一排 M 个 一共count item宽 itemW item高 itemH 承接的父视图 width 、height 左边距offsetLeft 右边距offsetRight 上边距offsetTop 下边距offsetBottom 所在index的Value
1 2 3 4 5 6 7 8 9 【3宫格】
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 【4宫格】
结论: Value-M * (Row - 1) -1 = index