GridView第一个Item中的CheckBox不工作

问题:如题

解决办法:

修改后:

ViewGroup.LayoutParams params =helper.getConvertView().getLayoutParams();
params.width=LayoutParams.MATCH_PARENT;
params.height=gridView.getWidth()/ROW_NUMBER

  

修改前:

AbsListView.LayoutParams params = new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, gridView.getWidth() / ROW_NUMBER);
helper.getConvertView().setLayoutParams(params);

 

 

参考:http://www.4byte.cn/question/337904/android-gridview-checkbox-of-the-first-item-not-work-when-i-recycled-convertview.html

posted @ 2015-02-26 17:15  Atlas's blog  阅读(212)  评论(0编辑  收藏  举报