Note that there are some explanatory texts on larger screens.

plurals
  1. POOn Android ICS multiple choice is broken in one of my ListViews
    primarykey
    data
    text
    <p>My android flash cards app has a bug that only occurs in ICS. The checkboxes behave like radiobuttons, like it was single-choice.</p> <pre><code>public class CardSetListActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.card_set_list); ListAdapter adapter = getSimpleCursorAdapter(); // ListAdapter adapter = getArrayAdapter(); ListView list = (ListView) findViewById(R.id.listView); list.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); list.setAdapter(adapter); list.setItemsCanFocus(false); } private ListAdapter getSimpleCursorAdapter() { CardsDbAdapter dbAdapter = CardsDbAdapter.getInstance(this); Cursor cursor = dbAdapter.fetchAllCardSets(); startManagingCursor(cursor); String[] fromColumns = new String[] { CardsDbAdapter.COL_CARD_SET }; int[] toResources = new int[] { android.R.id.text1 }; return new SimpleCursorAdapter(this, android.R.layout.simple_list_item_multiple_choice, cursor, fromColumns, toResources); } private ListAdapter getArrayAdapter() { String[] GENRES = new String[] { "Action", "Adventure", "Animation" }; return new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_multiple_choice, GENRES); } } </code></pre> <p>Any idea where I could look for a solution? With the SimpleCursorAdapter, the Checkboxes behave like RadioButtons. With the ArrayAdapter they behave right. I'm changing to use ArrayAdapter now but would still like to know what's going on here.</p>
    singulars
    1. This table or related slice is empty.
    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.
    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