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);
    }

posted @ 2016-04-07 09:08  海若初明  阅读(259)  评论(0编辑  收藏  举报