Android gridview中的有限复选框
如何在网格视图中为复选框选择设置5限制?我正在使用SparseBooleanArrayAndroid gridview中的有限复选框,android,checkbox,Android,Checkbox,如何在网格视图中为复选框选择设置5限制?我正在使用SparseBooleanArray holder.cb.setTag(position); holder.cb.setContentDescription(Uri.withAppendedPath( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "" + imageID).toString()); holder.cb.setChecked(mSparseBooleanArray.get(
holder.cb.setTag(position);
holder.cb.setContentDescription(Uri.withAppendedPath(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "" + imageID).toString());
holder.cb.setChecked(mSparseBooleanArray.get(position));
holder.cb.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// TODO Auto-generated method stub
mSparseBooleanArray.put((Integer) buttonView.getTag(), isChecked);
}
});
你的问题不清楚。请描述更多。如何限制网格视图中的复选框选择?