Note that there are some explanatory texts on larger screens.

plurals
  1. POToggling check boxes in MultiChoice AlertDialog in android
    primarykey
    data
    text
    <blockquote> <p>Hi,</p> <p>I have created the <strong>MultiChoice AlertDialog</strong> The AlertDialog has five list items with checkboxes. When I check First checkbox, w.r.t this the if the other checkboxes in the list are checked they shud be unchecked automatically and vice versa.</p> <p>I am checking the <strong>isChecked</strong> status in the <strong>onClick</strong> method of <strong>OnMultiChoiceClickListener()</strong> and calling the <strong>showDialog(DIALOG_MULTIPLE_CHOICE);</strong> by updating <strong>boolean[] checkedItems;</strong> to recreate the Dialog, But I am unable to achieve it. If you any suggestions please direct me to right way.</p> </blockquote> <p><strong>Is there any way to recreate the AleartDialog onClick event of the radio button click.</strong></p> <p>Some Sample Code below:</p> <pre><code>case DIALOG_MULTIPLE_CHOICE: final String[] lJobTypes = { "Item1", "Item2", "Item3","Item4", "Item5" }; return new AlertDialog.Builder(JoblistPage.this) // .setIcon(R.drawable.logo) .setTitle("Title Here") // .setCustomTitle(m_Title) .setMultiChoiceItems(lTypes, m_Selections, new DialogInterface.OnMultiChoiceClickListener() { public void onClick(DialogInterface dialog,int whichButton, boolean isChecked) { /* User clicked on a check box do some stuff */ if (isChecked) { m_CheckCount++; //Toggle the Radio button Check status } else { m_CheckCount--; } } }).setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }).create(); </code></pre> <p>Regards Vinayak</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload