체크박스를 체크할때 팝업이 뜨고, 해제할때도 팝업이 뜨게 하려고 합니다.
근데 더블클릭을 하면 팝업이 한번에 두번 뜨는것이 문제입니다. 구조는 다음과 같은데.. 뭐가 문제일까요?
ckeckbox.setOnCheckedChangeListener(new OnCheckedChangeListener()){
public void onCheckedChanged(ConpoundButton buttonView, final boolean isChecked)
{
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setCancelable(false);
builder.setPositiveButton("String", new DialogInerface dialog, int aa){
public void onClick(DialogInterface dialog, int )
if(!isChecked)
sendBoradcast()
});
builder.setNegativeButton("String", new DialogInerface.onClickListener() ){
public void onClick(DialogInterface dialog, int )
});
try { final AlertDialog alert = builder.create();
alert.show();
} catch(Exception e){ Log.e();}
}
}
}