android,解决ListView,GridView滑动冲突。

时间:2014-10-10 20:48:15   收藏:0   阅读:215

以gridView为例,如果gridView在里面,则重写GridView中的方法

/**
 * 重写该方法,达到使ListView适应ScrollView的效果
 */
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}

原文:http://www.cnblogs.com/aidonglei/p/4016760.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!