Now let's say I have a Layout with a scrollbar. Is there any way to
set it's location programmatically?

On Jul 6, 5:20 pm, Romain Guy <romain...@google.com> wrote:
> > Is it possible to change a scrollbar's location programatically? I
> > have a ListView and I want to set the position of the scrollbar in my
> > code.
>
> setSelectedPosition(int)
>
> > Also, I'm using the Instrumentation framework for feature testing. I
> > was wondering if it's possible to generate a "drag" movement with
> > Instrumentation.
>
> See the class called TouchUtils.
>
> > By dragging, I mean holding the mouse button in the
> > emulator window, and scrolling (which would make to scrollbar move). I
> > found the way to do some clicks, but I can't find out how to generate
> > the drag motion.
>
> Exactly how you described it: send a MotionEvent ACTION_DOWN, then
> several ACTION_MOVE, then an ACTION_UP. TouchUtils will do it for you.
>
>
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to