2

I've implemented a contextual action bar(CAB) with multiple selection in a listview. (similar to https://stackoverflow.com/a/10598553/940637).

Now i would to implement a editbutton, which needs to trigger the CAB to be shown. Is there anyway how this can be done?

I've tried startActionMode (but than i need to implement a separate callback), which i don't like.

Community
  • 1
  • 1
Luciano
  • 2,691
  • 4
  • 38
  • 64
  • Do you want to do something similar to this http://stackoverflow.com/questions/14128558/activate-cab-menu-when-onclickevent-happens-in-android ? – user Jan 15 '13 at 11:20
  • ye indeed.. It looks like the easiest way to do this, is by is by hacking a dummy item in the listview.. – Luciano Jan 15 '13 at 11:28
  • 1
    If I were in your place I would go with using a simple `ActionMode`(even for the `ListView`) instead of the `MultiChoiceModeListener` that should be much easier to manipulate than an dummy view. – user Jan 15 '13 at 13:24
  • ye ok, i think your right. – Luciano Jan 15 '13 at 14:17
  • OK thnx, i got it working with my own ActionMode. Afterall it wasnt that hard:P – Luciano Jan 15 '13 at 16:07
  • 2
    @Luizje it's helpful to the SO community if you post your solution as an answer. – Sufian Jun 30 '14 at 08:45

0 Answers0