I am trying to display a dialog containing checkbox items using the version
of setMultiChoiceItems that takes a cursor.  Everything works fine except
when I press the checkbox it doesn't change visually (I don't see the
tick).  If I close the dialog box and re-open it the tick is there and the
table in the database is being updated correctly.  So why no tick?  Here's
the code:

new AlertDialog.Builder(this)
            .setIcon(R.drawable.ic_menu_add)
            .setMultiChoiceItems(c, DbAdapter.KEY_IS_PINNED,
DbAdapter.KEY_TITLE, new OnMultiChoiceClickListener() {
                public void onClick(DialogInterface dialog, int which,
boolean isChecked) {
                    c.moveToPosition(which);
                    long id = c.getLong(0);
                    mDb.setPinnedContext(id, isChecked);
                }
            })
            .setPositiveButton("Okay", new OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    dialog.dismiss();
                    c.close();
                    fillData();
                }
            })
            .show();

Cheers,
Paul Drummond
-- 
Iode Software Ltd, registered in England No. 6299803.

Registered Office Address: 12 Sancroft Drive, Houghton-le-Spring, Tyne &
Wear, DH5 8NE.

This message is intended only for the use of the person(s) ("the intended
recipient(s)") to whom it is addressed. It may contain information which is
privileged and confidential within the meaning of applicable law. If you are
not the intended recipient, please contact the sender as soon as possible.
The views expressed in this communication may not necessarily be the views
held by The Company.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to