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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:56:07+00:00 2026-06-04T20:56:07+00:00

I have zoomable image and I’m using ScaleGestureDetector.SimpleOnScaleGestureListener . I need to implement following

  • 0

I have zoomable image and I’m using ScaleGestureDetector.SimpleOnScaleGestureListener. I need to implement following items:

  1. On Single Tap appear Toast with information about picture.
  2. On Double Tap image is zooming.

I have some issue. Before Double Tap always is Single Tap and picture is zooming, but appear Toast. Is there any way to avoid Single Tap? I dont have enough savvy to solve this problem.

P.S. I can’t use OnDoubleTapListener because use ScaleGestureDetector.SimpleOnScaleGestureListener.

UPD

case MotionEvent.ACTION_UP:
    firstTime = System.currentTimeMillis();
    if (Math.abs(firstTime-secondTime) < 300L) {
    // scale my matrix
    ---//---
    DONE = true; //this flag symbolize, that toast doesn't appear (false - appears)
    }
    else if (!DONE) {
         // making toast
    }
    secondTime = firstTime;
    break;

When DoubleTap is enable image scaled but appears toast

  • 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-04T20:56:08+00:00Added an answer on June 4, 2026 at 8:56 pm

    @matt5784, thank you. I was able to solve my problem.

    case MotionEvent.ACTION_UP:
        float xDiff =  Math.abs(curr.x - start.x);
        float yDiff =  Math.abs(curr.y - start.y);
        firstTime = System.currentTimeMillis();
        if (Math.abs(firstTime-secondTime) > 200L) {
            myHand.postDelayed(mRun, 200);
        }
        else if (!DONE) {
            //scale my matrix
            DONE = true; //this flag symbolize, that toast doesn't appear (false - appears)
        }
        secondTime = firstTime;
        break;
    
    Handler myHand = new Handler();
    private Runnable mRun = new Runnable() {
        @Override
        public void run() {
            if (!DONE) {
                         // make toast
            }
        } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an zoomable image in the website. When the image is zoomed out
I need a direction how to achieve the following functionality: I have a blueprint
Have started playing with Xcode 4.2, and created a single page application using storyboard
I want my application to have a zoomable element which will allow the XAML
I would like to create a zoomable image map containing irregular shapes upon which
Im currently developing a program that uses a scrollable/zoomable image as the main user
I have TextView and want to use setScaleX()/setScaleY() to make the text zoomable. But
Have following listener for keyboard ArrowDown event(it's key code is 40 ): window.onload =
I have a zoomable form-interface like MS Word. The form contains +70 controls (Richtextbox,
Have some code: using (var ctx = new testDataContext()) { var options = new

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.