Hello! I have made a small app extending Activity, which, in a (main) menu choice pops up a single-choice list. This kind of works, I can choose an item and dismiss the dialog.
In the layout-file, I have a CheckedTextView entry, containing a android:checkMark="?android:attr/listChoiceIndicatorSingle", which seems to be required for radio buttons to appear, but not for the functionality of the list itself. I make the single-choice-list-dialog by making an AlertDialog.Builder and calling "builder.setSingleChoiceItems(adapter, ...".
However, my problem is that when I make a choice, the corresponding button is not "enabled" visually, even though the OnCLick method is properly called.
I suspect I should somehow call setChoiceMode(ListView.CHOICE_MODE_SINGLE); or something, but this is a method of ListView, and I don't have any ListView. There is a getListView() in ListActivity, but my app extends Activity, not ListActivity. I am reluctant to change this, since everything else works just fine...
Any ideas of what I may have done wrong, or where I have misunderstood?
J.
In the layout-file, I have a CheckedTextView entry, containing a android:checkMark="?android:attr/listChoiceIndicatorSingle", which seems to be required for radio buttons to appear, but not for the functionality of the list itself. I make the single-choice-list-dialog by making an AlertDialog.Builder and calling "builder.setSingleChoiceItems(adapter, ...".
However, my problem is that when I make a choice, the corresponding button is not "enabled" visually, even though the OnCLick method is properly called.
I suspect I should somehow call setChoiceMode(ListView.CHOICE_MODE_SINGLE); or something, but this is a method of ListView, and I don't have any ListView. There is a getListView() in ListActivity, but my app extends Activity, not ListActivity. I am reluctant to change this, since everything else works just fine...
Any ideas of what I may have done wrong, or where I have misunderstood?
J.