PhysicsLayout icon indicating copy to clipboard operation
PhysicsLayout copied to clipboard

Too fast to the edge, the figure will disappear

Open ruichuntao opened this issue 7 years ago • 5 comments

i am Chinese ,Can you understand the title ?

ruichuntao avatar Jan 31 '18 07:01 ruichuntao

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 avatar May 10 '18 20:05 dphillipsprosper

@dphillipsprosper Could you able to solve this problem?

sukruavcuoglu avatar Dec 26 '18 14:12 sukruavcuoglu

I would like to know the solution too.

szkrisi99 avatar Feb 07 '20 12:02 szkrisi99

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.

dphillipsprosper avatar Feb 07 '20 18:02 dphillipsprosper

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.

szkrisi99 avatar Feb 07 '20 22:02 szkrisi99