Hi, I want to display list of items in my application and user will select checkbox which is present in front of each item. List is displayed well. It also shows checkbox infront of list item but when I click on checkBox it is not getting selected. My code is like this
public void onCreate(Bundle icicle) { super.onCreate(icicle); String[] names = new String[] { "123", "234", "345", "456", "567", "678", "789", "980}; this.setListAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_multiple_choice, names)); } @Override protected void onListItemClick(ListView lv, View v, int pos, long id) { super.onListItemClick(lv, v, pos, id); Object obj = this.getListAdapter().getItem(pos); String keyword = obj.toString(); Toast.makeText(this, "User selected: " + keyword, Toast.LENGTH_LONG) .show(); } what's wrong in this code? Thanks in advance -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en