[android-developers] Re: Fling on ListView
On Wed, Apr 1, 2009 at 11:40 AM, Romain Guy wrote: > > Using gestures to navigate within an app has a HUGE problem: it is > totally undiscoverable. > Additionally, it poses a problem with future devices: you shouldn't assume that every device that will run Android will have a touch screen. Evan Charlton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
> As to the "it was meant to be part of the UI design", I really wonder > why practically none of the apps shipped with Android use gestures > then (I mean, apart from scrolling up or down of course)? We use gestures for scrolling: ListView, GridView, Gallery, MapView, WebView, ScrollView. Calendar uses gestures to navigate between months/weeks/days. Calculator uses gestures to switch between the simple and complex operations. Etc. Using gestures to navigate within an app has a HUGE problem: it is totally undiscoverable. -- Romain Guy Android framework engineer romain...@android.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
Romain, thanks for pointing out onInterceptTouchEvent()! I'll take a look at that method ASAP. As to the "it was meant to be part of the UI design", I really wonder why practically none of the apps shipped with Android use gestures then (I mean, apart from scrolling up or down of course)? I can only think of the home app right now. In contrast, the iPhone makes very consistent use of flings to navigate back and forth between app screens. We tried to implement this for our app, but as I said, it wasn't actually an easy thing to do, because, for example, Android doesn't actually define what a left or right fling is (in terms of velocity and so forth). So, another app may have a different understanding of this, and react differently to left and right flings (in terms of when to interpret it as such, not in terms of the resulting action, which of course may be different), giving navigation in the platform an inconsistent feel. That's what I meant with messy and fragile. Cheers, Matthias On Mar 29, 8:16 pm, Romain Guy wrote: > > Doesn't look like fling support as known from the iPhone was ever > > meant to be part of Android's UI design. Making your app react to > > flings (or even detect them properly) is a messy and fragile procedure > > in Android. > > It was meant to be part of the UI design. And it's not messy nor > fragile, you just need to use onInterceptTouchEvent(). > > -- > Romain Guy > Android framework engineer > romain...@android.com > > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
> Doesn't look like fling support as known from the iPhone was ever > meant to be part of Android's UI design. Making your app react to > flings (or even detect them properly) is a messy and fragile procedure > in Android. It was meant to be part of the UI design. And it's not messy nor fragile, you just need to use onInterceptTouchEvent(). -- Romain Guy Android framework engineer romain...@android.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
Well, you can set a OnTouchListener on any view, including ListView, and use a GestureDetector to detect horizontal flings. So, yes, I guess. The problem with this whole touch mechanism in Android is that child views can silently consume the touch gesture, so your fling will not even propagate up to your ListView when it happened on a list element. Doesn't look like fling support as known from the iPhone was ever meant to be part of Android's UI design. Making your app react to flings (or even detect them properly) is a messy and fragile procedure in Android. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
Thanks. Is it possible to put multiple ListViews inside a Gallery so that I can have each ListView handles the vertical flings and the Gallery handles horizontal flings (scrolls from 1 ListView to another ListView). Thank you again. On Tue, Mar 24, 2009 at 3:54 PM, Romain Guy wrote: > > What's a "hort. fling"? Horizontal? ListView does not need horizontal > flings and therefore does not detect them nor does it notify of them. > > On Tue, Mar 24, 2009 at 3:37 PM, Lucius Fox wrote: >> >> Thanks. Is there a hook for application to get notified when users >> perform a hort. fling? >> >> I see code in AbsListView which handles the vertical fling, but i >> don't know it does hort fling. >> >> And why the OnScrollListener does not listen for hort. fling either? >> >> >> >> On Tue, Mar 24, 2009 at 11:06 AM, Romain Guy wrote: >>> >>> ListView does not use a GestureDetector. >>> >>> On Tue, Mar 24, 2009 at 11:03 AM, Lucius Fox wrote: Hi, Can you please tell me which method in ListView is handling the fling action (up and down)? I look at the source of ListView, I don't see a GestureDectector there. Thank you. > >>> >>> >>> >>> -- >>> Romain Guy >>> Android framework engineer >>> romain...@android.com >>> >>> 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 >>> >>> > >>> >> >> > >> > > > > -- > Romain Guy > Android framework engineer > romain...@android.com > > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
What's a "hort. fling"? Horizontal? ListView does not need horizontal flings and therefore does not detect them nor does it notify of them. On Tue, Mar 24, 2009 at 3:37 PM, Lucius Fox wrote: > > Thanks. Is there a hook for application to get notified when users > perform a hort. fling? > > I see code in AbsListView which handles the vertical fling, but i > don't know it does hort fling. > > And why the OnScrollListener does not listen for hort. fling either? > > > > On Tue, Mar 24, 2009 at 11:06 AM, Romain Guy wrote: >> >> ListView does not use a GestureDetector. >> >> On Tue, Mar 24, 2009 at 11:03 AM, Lucius Fox wrote: >>> >>> Hi, >>> >>> Can you please tell me which method in ListView is handling the fling >>> action (up and down)? >>> I look at the source of ListView, I don't see a GestureDectector there. >>> >>> Thank you. >>> >>> > >>> >> >> >> >> -- >> Romain Guy >> Android framework engineer >> romain...@android.com >> >> 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 >> >> > >> > > > > -- Romain Guy Android framework engineer romain...@android.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
Thanks. Is there a hook for application to get notified when users perform a hort. fling? I see code in AbsListView which handles the vertical fling, but i don't know it does hort fling. And why the OnScrollListener does not listen for hort. fling either? On Tue, Mar 24, 2009 at 11:06 AM, Romain Guy wrote: > > ListView does not use a GestureDetector. > > On Tue, Mar 24, 2009 at 11:03 AM, Lucius Fox wrote: >> >> Hi, >> >> Can you please tell me which method in ListView is handling the fling >> action (up and down)? >> I look at the source of ListView, I don't see a GestureDectector there. >> >> Thank you. >> >> > >> > > > > -- > Romain Guy > Android framework engineer > romain...@android.com > > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fling on ListView
ListView does not use a GestureDetector. On Tue, Mar 24, 2009 at 11:03 AM, Lucius Fox wrote: > > Hi, > > Can you please tell me which method in ListView is handling the fling > action (up and down)? > I look at the source of ListView, I don't see a GestureDectector there. > > Thank you. > > > > -- Romain Guy Android framework engineer romain...@android.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---