I am using a custom array adapter and layout for my view. Custom view's List items have different buttons in it which are working without any issues. However, I want to select each List Item and have CAB appear when long pressed. For some reason CAB doesn't appear when I am using it with my custom view. However, if I uncomment the line to use String Array adapter then it works fine.
String[] ITEMS = new String[] { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6" };
datasource = new FavoritesDataSource(this);
datasource.open();
tempList = datasource.getAllFavorites();
myAdapter = new FavoritesArrayAdapter(this, tempList);
datasource.close();
ListView lv = getListView();
lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
lv.setMultiChoiceModeListener(new ModeCallback());
setListAdapter(myAdapter);
//setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_activated_1, ITEMS));
I am not sure what I am doing wrong. Any help will be appreciated. Thanks