Meetic / Dragueur

Dragueur can move any view with one finger ;)
120 stars 14 forks source link

set View in new postion #4

Open bishnu371 opened 7 years ago

bishnu371 commented 7 years ago

There is any way to drag/set view in new position

netimen commented 7 years ago

lack of ability to fix view in new position makes this library almost unusable

hvrsalovic commented 7 years ago

as a temporary workaround, you may try something like this:

ViewGroup v = new com.meetic.dragueur.DraggableView(this); ((DraggableView)v).setViewAnimator(new ViewAnimator() { @Override public boolean animateExit(@NonNull DraggableView draggableView, Direction direction, int duration) { draggableView.initOriginalViewPositions(); return true; }

@Override public boolean animateToOrigin(@NonNull DraggableView draggableView, int duration) { draggableView.initOriginalViewPositions(); return true; }

@Override public void update(@NonNull DraggableView draggableView, float percentX, float percentY) {

        }
    });

...granted it has limitations and might conflict with things you may want to do with custom animators.

ckdevrel commented 7 years ago

I am also looking for the same solution to set the view to the new location .