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 6801791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:08:37+00:00 2026-05-26T19:08:37+00:00

Hi to all, Is there any class which have combined functionality of ScaleGestureDetector and

  • 0

Hi to all,


Is there any class which have combined functionality of ScaleGestureDetector and GestureDetector ?
I am using below code for onTouchEvent but only one gesture class is running. If I want to use all the functions of GestureDetector as well as ScaleGestureDetector

@Override
    public boolean onTouchEvent(MotionEvent ev) 
    {
        if (mScaleDetector.onTouchEvent(ev))
            return true;
        else if (mGestureDetector.onTouchEvent(ev))
            return true;
        else
            return false;}

where mScaleDetector is ScaleGestureDetector and mGestureDetector is GestureDetector


thanks in advance

  • 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-05-26T19:08:37+00:00Added an answer on May 26, 2026 at 7:08 pm

    For me doing something like

    return mScaleDetector.onTouchEvent() && mGestureDetector.onTouchEvent(ev);
    

    seems to work. The explanation may be that when you do a boolean and between them, it will process both methods in order to obtain the result to be returned.

    The issue with your approach may be that you perhaps forgot to return true when one of the gesture methods consumed the event.

    Hope this helps,
    Mihai

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

Sidebar

Related Questions

I have come across a class which is non-static, but all the methods and
Is there any particular reason that all data members in a class are private
Is there any way to list all the files that have changed between two
Good afternoon all, I have a class which looks like this: public class Grapheme
Are there any good alternative to NHibernate's xml mappings? I have seen Fluent. All
Hi All is there any way to locally define a variable in a function
Are there any open-source libraries that all programmers should know about? I'm thinking something
Is there any way to tile all of the form children of an mdi
Are there any implementations of all the nifty Selenium on Rails methods like wait_for_visible
Is there any way to catch all syscalls on Linux? The only solution I

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.