Comments (2)
Hi @Prakash19921206,
Thank you for your interest in using this library
Regarding the implementation in scroll view, could you share your layout structure or the use case / scenario you want to achieve with the draggable view?
Draggable view can conflict with touch event from scroll view if it is placed inside the scroll view. One way to make it work is to place it on the same level as the scroll view (we need a viewgroup to wrap both view).
<!-- Parent / Root -->
<FrameLayout>
<ViewThatWantToBeDraggable/>
<ScrollView>
<LinearLayout>
<!-- Scroll view content -->
</LinearLayout>
</ScrollView>
</FrameLayout>
This way, the scroll view touch event won't intercept the touch event of draggable view.
I've made a small example regarding this
Is that the kind of behavior you want to achieve?
from draggableview.
Thanks for your reply.
I also needed dragable view to only move within some boundary(LinerLayout) - just like a slider header
I tried a different approach,
- Implemented Custom Scroll view to enable/disable scroll whenever we want, based on stackoverflow answer
- used this class to set draggable view and limit its movement within a defined boundary - i modified this class a little to enable/disable scroll view when dragabble move is moving around [using
ACTION_UP
andACTION_DOWN
touch listener]
Here is a sample project with above mentioned code implementation
from draggableview.
Related Issues (14)
- Create helper to extend the behaviour to any view HOT 2
- How to make draggable webview using this ?
- Is there a function to resize the ImageView while on dragging? HOT 1
- How to drag over other items?
- OnLongClickListener not working HOT 1
- Unable to implement for CameraX PreviewView HOT 3
- Convert lib to java HOT 2
- OnPositionChangedListener HOT 1
- ClassCastException raise when cast ViewRootImpl cast to View HOT 6
- disable drag
- View not dragging when it was on bottomsheet. HOT 1
- how can i maintain view position while orientation change ?
- how to change its view position by passing value of x and y ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from draggableview.