Highlight selected items in ListFragment (MultiChoiceModeListener)?

bmnbmn

New Member
I want to be able to see what items that have been selected in my list. Before turning ListView into ListFragment, the selected items had a blue background color (Holo Dark), but now I can only see the blue color while pressing the items - then it disappears. I do not have a problem with the items getting "checked", because they are. You just can't see it.Here's what I do in onActivityCreated():\[code\]getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);getListView().setItemsCanFocus(false);getListView().setMultiChoiceModeListener(new LongPress());\[/code\]LongPress() is a private class implementing ListView.MultiChoiceModeListener. It opens up a contextual action bar when holding finger on an item. The user can then select more items, and this is where the problem occurs. You can not see which items are checked or not (I want them to be highlighted). Why did it work before extending ListFragment? Do I have to create a custom selector in my .xml-files? Because that didn't seem to work either. I would prefer using the custom one, if there's any.Here's another method in my ListFragment class:\[code\]@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_listview, container, false);}\[/code\]fragment_listview.xml isn't doing anything special apart from changing the background color and the color of the divider.What should I do?
 
Back
Top