Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8193683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:34:04+00:00 2026-06-07T04:34:04+00:00

The documentation say this about that: A gesture starts with a motion event with

  • 0

The documentation say this about that:

A gesture starts with a motion event with ACTION_DOWN that provides
the location of the first pointer down. As each additional pointer
that goes down or up, the framework will generate a motion event with
ACTION_POINTER_DOWN or ACTION_POINTER_UP accordingly.

So i have done the override of onTouchEvent function in my activity:

@Override
public boolean onTouchEvent(MotionEvent MEvent) 
{

    motionaction = MEvent.getAction();

    if(motionaction == MotionEvent.ACTION_DOWN)
    {
        System.out.println("DEBUG MESSAGE POINTER1 " + MEvent.getActionIndex() );
    }

    if(motionaction == MotionEvent.ACTION_POINTER_DOWN)
    {
        System.out.println("DEBUG MESSAGE POINTER2 "  + MEvent.getActionIndex() );
    }

}

Unfortunately the second if is never entered. The activity contains 2 view with 2 OnTouchListener, i know that onTouchEvent is called only if the view of the activity don’t consume the event so i tried to return false in the listener and in that way i can recognize only the first finger touch but this avoid the listener to receive the ACTION_UP event and don’t allow me to recognize the second finger touch. I also tried to return true in the listener but after manually invoke the onTouchEvent function but this allow me to recognize only the first finger touch too.

What’s wrong in my code ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:34:06+00:00Added an answer on June 7, 2026 at 4:34 am

    I believe your code is missing the masking operation like:

    switch (motionaction & MotionEvent.ACTION_MASK) {
    case MotionEvent.ACTION_POINTER_DOWN:
    }
    

    This code should be able to check for ACTION_POINTER_DOWN.

    Good luck & tell us what happens.

    Tommy Kwee

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The documentation has this to say about SKErrorClientInvalid: Indicates that the client is not
The documentation doesn't say anything about that. When an old object is removed and
The GCC 4.1.2 documentation has this to say about the -pipe option: -pipe Use
Apple does say in the documentation about the fact that they do not want
Java documentation says that a ServerSocket , x , that is listening on, say,
It's very sad to say that this question was asked several times and never
Ok, this might be a very noob question, but I find that PHP Documentation
The documentation does not say much besides: Private: Changes made to the resulting buffer
Say you have an Abstract Class with Abstract methods, and you place XML Documentation
I'm having problems and I'm not sure I understand the STL documentation. Let's say

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.