You get that position as part of the long press callback. On Fri, Jan 8, 2010 at 1:23 PM, sdphil <[email protected]> wrote: > so how do I get the position of the item that was long pressed? > > On Jan 8, 1:20 pm, Romain Guy <[email protected]> wrote: >> There's no selection in touch mode, that's why you get these results. >> >> >> >> On Fri, Jan 8, 2010 at 12:07 PM, sdphil <[email protected]> wrote: >> > I have googled around and I saw some posts about being in "touch >> > screen mode" -- I don't fully understand what that means. >> >> > However, I cannot seem to get this call to work - it always returns >> > -1. >> >> > I am doing a "long press" on an item in a grid view, and I've >> > registered for the long press for the entire grid. When I receive a >> > long press, I go ask the grid what the selected item is, and it always >> > returns -1, even though I can visually see the item selected! >> >> > I tried calling GridView.getSelectedView() (in hopes of calling >> > GridView.getPositionForView() later), but that returns null. >> >> > any help greatly appreciated. >> >> > tia. >> >> > -- >> > 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 >> >> -- >> Romain Guy >> Android framework engineer >> [email protected] >> >> Note: please don't send private questions to me, as I don't have time >> to provide private support. All such questions should be posted on >> public forums, where I and others can see and answer them > > -- > 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 >
-- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them
-- 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

