On Apr 14, 9:21 pm, warb <[email protected]> wrote:
> I want to respond to a trackball press. I have found how to respond to
> movement
>
> view.onTrackballEvent(MotionEvent) , but now want to handle the
> click.
>
> Thanks.

Ok,
So I found it... the MotionEvent.ACTION_DOWN in handling the
MotionEvent is the
ticket....

      public boolean doTrackballEvent(MotionEvent motionEvent)
        {
            switch (motionEvent.getAction())
            {
            case MotionEvent.ACTION_DOWN:
                newBall();
                break;
            case MotionEvent.ACTION_MOVE:
                @SuppressWarnings("unused")
                float getX = motionEvent.getX();
                if (getX > 0)

In my View:

  @Override
    public boolean onTrackballEvent(MotionEvent motionEvent)
    {
        return thread.doTrackballEvent(motionEvent);
    }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to