I'd register the control as a context menu receiver. That'll allow you
to have the list item perform the default or preferred activity on
click as well as hold click for further operations. This caters for
fast simple use and powerful functionality.

Something along these lines (where LIST_VIEW is your list view):

public void onCreate(Bundle savedInstanceState) {
    ...
    registerForContextMenu(LIST_VIEW);
    topList.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(...) {
            //ON ITEM CLICK
            ...
        }
    );
    ...
}
...
public boolean onContextItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        //ON ITEM CONTEXT MENU SELECTED
        ...
    }
}

On Aug 20, 3:49 pm, Mark Hansen <[email protected]> wrote:
> This maybe against the way the Android team wants this to work, but if
> not I can't seem to come up with a way to do this.
>
> Basically I have a list view that I want to create a ContextMenu when
> onListItemClick received.  So when the user clicks on a list item I
> want them to choose the action from a ContextMenu.
>
> Anyone have an example of how to do this, I can get it to work with no
> problems with a long press, but my users are missing the menu and just
> thinking the ListView does nothing.

On Aug 20, 3:49 pm, Mark Hansen <[email protected]> wrote:
> This maybe against the way the Android team wants this to work, but if
> not I can't seem to come up with a way to do this.
>
> Basically I have a list view that I want to create a ContextMenu when
> onListItemClick received.  So when the user clicks on a list item I
> want them to choose the action from a ContextMenu.
>
> Anyone have an example of how to do this, I can get it to work with no
> problems with a long press, but my users are missing the menu and just
> thinking the ListView does nothing.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to