PhysicsLayout
PhysicsLayout copied to clipboard
Too fast to the edge, the figure will disappear
i am Chinese ,Can you understand the title ?
I'm experiencing the same thing. Drag one of the views in the viewgroup (I'm using PhysicsFrameLayout) more than 50% past the bounds, and the view flies away, never to be seen again.
EDIT - The solution seems to be increasing the boundsSize, like the demo to 100dp. After doing that, I can't fling them out of the PhysicsFrameLayout anymore.
EDIT 2 - Well, I was wrong. Even with boundsSize=100dp, if I fling a view really hard at the edge of it's container, it still breaks through and flies away forever.
@dphillipsprosper Could you able to solve this problem?
I would like to know the solution too.
I did not solve it. I just made it so you can't drag/fling them around anymore. It was a nice, but unnecessary feature for my usecase.
I tried everything, but i couldnt get it to work. Something is with the collision detection because you can drag it when it is directly next to the bound and it still tries to move. It would be awesome if you could disable the drag to the bound direction. Or if it would be physicly imposibble for the view to get out of the layout. Im looking forward for a solution because i would like to use this awesome library in one of my projects.