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

  • Home
  • SEARCH
  • 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 3229588
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:49:41+00:00 2026-05-17T16:49:41+00:00

i have a image view which is drag able and zoom able but now

  • 0

i have a image view which is drag able and zoom able but now i also need to put setOnLongClickListner on my image view. i have done that but it is not working. but when i disabled the ontouch event it started working. can anybody tell me please how to fix that.
here is my code

    image.layout(0, 30, screenWidth, screenHeight - 30);
    image.setScaleType(ImageView.ScaleType.FIT_XY);


    params = new RelativeLayout.LayoutParams(screenWidth, screenHeight - 30);
    params.leftMargin = 0;
    params.topMargin = 30;


    layout.addView(image, params);

    image.setOnLongClickListener(new View.OnLongClickListener() {
        public boolean onLongClick(View v) {


            Log.i("its working", "its working");

            return true;
                    }
    });

    image.setOnTouchListener(this);

i,ll be very thankful.

thanks a lot.

  • 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-17T16:49:42+00:00Added an answer on May 17, 2026 at 4:49 pm

    I think that the Object can have either an onClick or an onTouch, and it will use whatever the last one defined is. I have noticed this recently in some of my apps too.

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

Sidebar

Related Questions

I have a view which contains 2 image view that is using the ondraglistener
I have an imageview, which uses matrix to scale/drag an image. Now I want
I have an image view on which i have included a table view. Now
i have view controller which contains a button which show the image library ,if
I have a view and template called index.html. I have a image which is
I have a binary image (a dll) which I wish to view the assembly
I need to display array of images in a single view which have various
I have picture in my dropbox, which i need to show in Uitable view.
I have a form(table view) which contains textfields and textview as subviews,I need to
i have a view on which i have image view and scroll view and

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.