New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scale Item while Dragging #193
Comments
Hi. Thanks for your suggestion, but that is difficult to implement
However, there is a way to implement scaling animation of the dragging item. You can achieve that by modifying the |
thank you for your reply this was helpful.. 1 1 2 1 1 I can't drag the 2 in the corner its on purpose or it is a bug ? |
@lkevin029 Thanks for pointing it out. I have just fixed the behavior for GridLayoutManager. Try the patched version of the library via jitpack. build.gradlerepositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.h6ah4i:android-advancedrecyclerview:fbb4f3bc883de883d79ec04d03d9cf74f2773322'
} |
@lkevin029 The |
@h6ah4i I am trying to implement your suggestion to be able to scale the dragged view while dragging. I was trying to customize the DraggingItemDecorator. The issue is that the decorator is being use by the RecyclerViewDragDropManager internally on the startDragging() which is a private method. So extending from RecyclerViewDragDropManager to override startDragging and specify a custom DraggingItemDecorator is not an option. A lot of classes within the library are protected so I cannot use them on my project. I don't want to include all the source code on my project. I was trying to keep using gradle to import it dynamically. Any suggestion on this? How should I proceed to specify the DraggingItemDecorator implementation that I want to use to the RecyclerViewDragDropManager? Thanks |
@richardjbs Hi. Yes, I meant that my suggestion require to fork this project. I admit that forking & modifying Also, I will reopen this issue. I closed this issue by mistake, I have fixed the sub-issue in v0.8.7 but the main issue is still not fixed yet. Thanks |
These methods are added to RecyclerViewDragDropManager; - void setDraggingItemScale(float scale) - float getDraggingItemScale() - void setDraggingItemRotation(float rotation) - float getDraggingItemRotation() - void setDraggingItemAlpha(float alpha) - float getDraggingItemAlpha() - void setDragStartItemAnimationDuration(int duration) - int getDragStartItemAnimationDuration() - void setDragStartItemScaleAnimationInterpolator(Interpolator interpolator) - void setDragStartItemRotationAnimationInterpolator(Interpolator interpolator) - void setDragStartItemAlphaAnimationInterpolator(Interpolator interpolator) Also, the `DraggableItemAnimator` is added. Using this ItemAnimator gives better item animation if using drag and drop feature.
Related #292. |
This enhancement has been included in v0.10.0. |
setDraggingItemScale(float scale) works perfect but it only draws inside the recyclerView bounds, is it possible to make it get bigger on outside as well? |
How to make the item bigger when dragging start?
this is my code.
but its not working because the holder in dragging is different its just a copy of the original one.
I think its better you add holder in onItemDrag events so every one can make any changes in Item while dragging
The text was updated successfully, but these errors were encountered: