unable to aquire listview position using touchscreen longcli

Put your problem here if it does not fit any of the other categories.

unable to aquire listview position using touchscreen longcli

Postby pentace » Sat Nov 29, 2008 10:15 pm

when using the touch screen to bring up a context menu using a long click on listactivity the position always returns 0. i was told to try this following code snipit

Code: Select all
  @Override
  public boolean onContextItemSelected(MenuItem item)
  {
     final AdapterView.AdapterContextMenuInfo acmi = (AdapterView.AdapterContextMenuInfo)
      item.getMenuInfo();
              long clickedId = (long) acmi.id;


the problem is it always returns 6 now. even if i change it to acmi.position it always is 6 can someone please help
pentace
Junior Developer
Junior Developer
 
Posts: 19
Joined: Wed Oct 22, 2008 2:16 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 21 guests