【发布时间】:2017-04-24 07:02:41
【问题描述】:
我正在尝试覆盖 GridLayoutManager 中的 measureChild 以在测量中使用特定的布局参数。但是GridLayoutManager 有自己的measureChild 私有实现:
private void measureChild(View view, int otherDirParentSpecMode, boolean alreadyMeasured)
如果我在RecyclerView.LayoutManager 中覆盖公共measureChild:
@Override
public void measureChild(View child, int widthUsed, int heightUsed) {
super.measureChild(child, widthUsed, heightUsed);
}
它永远不会被调用。
GridLayoutManager可以测孩子吗?
【问题讨论】:
标签: android android-recyclerview gridlayoutmanager