-
Notifications
You must be signed in to change notification settings - Fork 507
Closed
Labels
Description
不添加多选监听时会崩溃
/**
* @author KARL-dujinyang
*/
class OnCheckBoxCheckListener implements CompoundButton.OnCheckedChangeListener{
private MediaBean mediaBean;
public OnCheckBoxCheckListener(MediaBean bean){
this.mediaBean = bean;
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(mConfiguration.getMaxSize() == mMediaActivity.getCheckedList().size() &&
!mMediaActivity.getCheckedList().contains(mediaBean)) {
AppCompatCheckBox checkBox = (AppCompatCheckBox) buttonView;
checkBox.setChecked(false);
Logger.i("选中:" + mMediaActivity.getResources().getString(R.string.gallery_image_max_size_tip, mConfiguration.getMaxSize()));
iMultiImageCheckedListener.selectedImgMax(buttonView, isChecked, mConfiguration.getMaxSize());
} else {
if(iMultiImageCheckedListener!=null)
iMultiImageCheckedListener.selectedImg(buttonView, isChecked);
}
}
}
iMultiImageCheckedListener空指针