Is it possible to create a dynamic context menu in android?
What I mean is, for example, if I have a list of items, that can be in two states: "read" and "unread". I want to be able to bring up a context menu with an option of "Mark as Read" for the unread items, and "Mark as Unread" for the read items.
So clicking on:
> read
> unread <-- click
> read
will show context menu "Mark as Read" resulting in:
> read
> read
> read <-- click
will show the menu "Mark as Unread".
Is there some function that allows me to customize the creation of the context menu, just before it is displayed?
Any help is welcome!