问题:如题

解决办法:

修改后:

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

相关文章:

  • 2022-02-08
  • 2022-12-23
  • 2022-02-19
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
猜你喜欢
  • 2021-12-30
  • 2021-10-23
  • 2022-02-07
相关资源
相似解决方案