首页 > 移动平台 > 详细

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

时间:2014-10-10 20:48:15      阅读:214      评论:0      收藏:0      [点我收藏+]

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

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!