I found out how to generate the drag effect, but I can't control it's
speed (so it always drags all the way up or all the way down since
it's doing to action very fast).

I'm using MouseEvent.obtain to get the Event. Then I use
sendPointerSync from Instrumentation. What I'm doing is send an
ACTION_DOWN, then an ACTION_MOVE, then an ACTION_UP.

It works, but like I said, it always dargs all the way up or down. Is
there a way to control the speed. I saw there are 2 parameters related
to time: downTime and eventTime. I read the documentation, but I can't
figure out how they really work. Can you explain how these 2
parameters work? And what should I set for those 2 parameters on my 3
motion events in order to have a "human" speed?

Thanks.

On Jul 6, 4:30 pm, Mathieu Plourde <[email protected]> wrote:
> Hello devs,
>
> 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.
>
> Also, I'm using the Instrumentation framework for feature testing. I
> was wondering if it's possible to generate a "drag" movement with
> Instrumentation. 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.
>
> Thank you.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to