I am creating a ListView using customized TextView, as shown below:
Normally we use this code for multiple list item selection:
setListAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_multiple_choice,
hometown));
But I have changed the 2nd argument of ArrayAdapter to my customized
TextView, hence i dont understand where to put the option for multiple
choice of list items.
You need to make sure that you have a layout for each list item that
includes your custom TextView and a check box, but you need to do a little
more to get automatic check functionality back.
See if this post, mentioned StackOverflow, helps:
http://www.marvinlabs.com/2010/10/custom-listview-ability-check-items/
--
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