On Thu, Nov 5, 2009 at 10:36 AM, Romain Guy <romainguy@google.com> wrote:
This is not supported at the moment. You can use setSelectedPosition()
(or something like that) but it won't animate the scroll as with a
gesture.
On Thu, Nov 5, 2009 at 6:56 AM, Hong <lordhong@gmail.com> wrote:
> Hi,
>
> I'm trying to scroll the ListView up/down actions by pressing a button,
> instead of using finger gesture.
> It looks like the super class AbsListView.onTouchEvent(MotionEvent ev)
> handles all the scrolling up/down motion and animation.
> So if I want to scroll the list by pressing a button, I don't really have a
> MotionEvent to pass onto onTouchEvent method for it to work.
>
> I tried ListView.scrollTo(x,y), it kind of works but the hidden part of the
> ListView is not rendered when shown on the screen.
> I am trying to re-draw the list by using:
> ListView.invalidate(), ListView.invalidateViews(),
> list.adapter.notifyDataSetChanged()
>
> They all did not work.
>
> So kind of stuck here, anyone has any suggestion?
>
> Thanks
>
> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
Romain Guy
Android framework engineer
romainguy@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment