解决scrollview 嵌套gridview或者listview 冲突的问题

来源:互联网 发布:mac桌面软件 编辑:程序博客网 时间:2024/04/29 06:55
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec,expandSpec);//设置gridview或者listview的onMeasure方法,使得gridview或listview的高度为它所需要的高度,这样listview和gridview就不需要滚动了
原创粉丝点击