获取ListView内容高度



如何获取list-view content height(不是列表视图高度(。是否可以使用 onLayout 方法?

我弄清楚了。我们可以使用 oncontentsizechange 获取列表视图高度。

<ListView
    ref={ref => this.listView = ref}
    onContentSizeChange={this.onContentSize}
/>
onContentSize(contentWidth, contentHeight) {
    console.log("<<<<<< content >>>>>>>>>", contentWidth, contentHeight);
}

最新更新