In android how to disable scrollview action, so that dragging is possible.

Posted on 2011-04-20
Last Modified: 2012-05-11
Hello friend,

     I am working on some dragging functionality in which I need to drag small icon image on scrollable layout. But When image which is drag then instead of dragging scrolling is done.
So please tell me how I stop this scrolling action at the time  dragging and again start it.
     Also if any other solution for this problem then please tell me.

Thank You for help.
Question by:jbajaj
    LVL 8

    Expert Comment

    set the scrollable property of that element to false

    Author Comment

    Hi shaunak,
          Can you give me an example  how/which property I can set to false. Because I try it for most of property but I am not success to disable scroll bar.

    Thank You.
    LVL 8

    Accepted Solution

    I guess there there is no property to set the scroll view to stop scroll.
    But one thing we can do that is we can control  the on touch of the image view.
    Create one custom image view. Override the OnTouchEvent() method. In this if the user touched the image view set a flag .
    And then override the onTouch of scroll view .Use this flag in the on touch of scroll view.If the flag is set then return true. In this way we can control the scrolling of scroll view.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Title # Comments Views Activity
    Issue with "Outlook for IOS and Android" 5 215
    VOIP client on iOS/Android 6 47
    Call me when line clears 3 66
    OpenIn and Android 1 45
    Recently Amazon announced their entry in the tablet device called the Amazon Kindle Fire. Some of you might have used an Ipad or have considered buying one. While they're similar in form and function in that they both have color displays with multit…
    I recently asked a question ( about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now