listview 和 scrollview 一起使用 listview 测量高度不准确

自定义 listview 重写 onmeasure方法

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,  
                MeasureSpec.AT_MOST);  
        super.onMeasure(widthMeasureSpec, expandSpec);
    }

原文地址:https://www.cnblogs.com/childyngy/p/5362114.html