in the below code i am trying to use a checkbox. but at run time it is never clickable, i mean when i click on the check box nothing happen or change and the checkbox remains always unchecked
why that is happening?
code:
mcbComputations.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mcbComputations.isChecked()) {
mATComputations = new ATComputations();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mATComputations.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
mATComputations.execute();
}
} else {
mATComputations.cancel(true);
}
Aucun commentaire:
Enregistrer un commentaire