美文网首页
关于scrollView嵌套listview

关于scrollView嵌套listview

作者: 吾娛生活 | 来源:发表于2018-08-23 14:13 被阅读0次

1,自定义一个StillListView继承ListView,重写方法

@Override

public void onMeasure(int widthMeasureSpec,int heightMeasureSpec) {

int expandSpec = MeasureSpec.makeMeasureSpec(

Integer.MAX_VALUE >>2, MeasureSpec.AT_MOST);

super.onMeasure(widthMeasureSpec, expandSpec);

}

2,scrollView中的直接子LInearlayout使用android:layout_height="wrap_content",

3,里面的三四级嵌套的Linearlayout不要使用android:layout_weight="1"这种写法。

相关文章

网友评论

      本文标题:关于scrollView嵌套listview

      本文链接:https://www.haomeiwen.com/subject/lobibftx.html