If you cannot figure out how to use the SeparatedListAdapter, or where it may need to be extended to help you achieve your ends, find some other UI pattern you are more comfortable with.
Wouter wrote: > How? if i want to delete a item in my list what do i have to do with > getItem? > for example I have a delete option in my OptionsMenu: > > This was my original code: > public boolean onOptionsItemSelected(MenuItem item) { > switch (item.getItemId()) { > case DELETE_ID: > > Cursor flightsCursor = flightDbHelper.fetchAllFlights(); > long position = listView.getSelectedItemId(); > flightsCursor.moveToPosition((int) position); > flightDbHelper.deleteFlight(position); > fillData(); > > break; > } > > but now i have to detect which list it was so i have to delete it from > my flight database or hotel database! > How can i do that? > > On Mar 24, 9:34 pm, Mark Murphy <mmur...@commonsware.com> wrote: >> Wouter wrote: >>> Ok i have integrated it now in my applications. It works now to show >>> the 2 lists as one 1 list with seperated headers. >>> But now, how can i determine which list is was, to integrate my >>> seperated actions? >>> I have a lists for flights and hotels (for example). When i click on a >>> item in the flight list i have to open another activity then when I >>> click on a item in the hotel list! >> The same way you do with any list: call getItem() on the adapter. >> >> -- >> Mark Murphy (a Commons Guy)http://commonsware.com >> Android App Developer Training:http://commonsware.com/training.html > > -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Training: http://commonsware.com/training.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---