版权声明:转载请说明出处 https://blog.csdn.net/qq_42046338/article/details/83825909
解决方法 重写ListView中的 onMeasure方法
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
简简单单这样你去嵌套 NestedScrollView 就不会出现只出现一条Item的现象。