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

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.
Who is Participating?
SanthanaTechnical LeadCommented:
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.
set the scrollable property of that element to false
jbajajAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.