Releases: janishar/PlaceHolderView
Dynamic view margin, Undo last swipe, Putback swiped view, Lock view
This Version adds several new functionality to the SwipePlaceHolderView:
I. Dynamic view margin: This will allow to specify margin for placing cards at appropriate position programmatically.
example: mSwipePlaceHolderView is the SwipePlaceHolderView layout
mSwipePlaceHolderView.setSwipeDecor(new SwipeDecor()
.setMarginTop(300)
.setMarginLeft(100)
.setViewGravity(Gravity.TOP)
Note:
- This will place the card at 300 pixel from top and 100 pixel from left.
- If setViewGravity(Gravity.TOP) is not provided then the margin will take place from the center on the screen.
II. Undo last swipe: This will allow to put the last swiped view back on the top.
Example:
//It initializes the Undo functionality
mSwipePlaceHolderView.getBuilder() .setIsUndoEnabled(true)
//To undo call this method
mSwipePlaceHolderView.undoLastSwipe();
III. Putback swiped view: This functionality enable the card to be swiped and then animate back on the top. So, user is not able to swipe other cards other than top.
Example:
//Activates the Putback functionality
mSwipePlaceHolderView.activatePutBack();
//Deactivates the Putback functionality
mSwipePlaceHolderView.deActivatePutBack();
IV. Lock view: This allows the card to be locked. The user will not be able to swipe the locked cards.
Example:
//It locks the card view
mSwipePlaceHolderView.lockViews();
//It Unlocks the locked card view
mSwipePlaceHolderView.unlockViews();
Gravity fix for the card
0.2.9 Update README.md
Click and Long Click dynamic binding for SwipePlaceHolderView
@Click
and @LongClick
for SwipePlaceHolderView will now be activated when the stack card view comes to the top
Item View refresh methods and get position method before bind
This update adds below methods to the PlaceHolderView
<T>int getViewResolverPosition(T resolver)
: This will give the position of the class object which is added as the item view, even before the item view is binded to the window.<T>void refreshView(T resolver)
: This will refresh the item view after new data is added based on the class object reference added as item view.public void refreshView(int position)
: This will refresh the item view after new data is added based on the position of item view.
Swipe calculation w.r.t the initial touch point
This update calculates the swipe with-respect-to initial touch point. Earlier versions used to calculate swipe w.r.t. on the coordinate center being the actual screen center.
This enables swiping even from the edges of the cards correctly as opposed to earlier version.
programmatically doSwipe message display fix
doSwipe method call for programmatically doing swipe will now display accept/reject message views
SwipeView addition and SwipeDecor modifications
SwipeView annotation is added. It will help to get a reference to the swipeable view.
SwipeDecor has additions to specify view height, width and gravity.
New InfinitePlaceHolderView and SwipePlaceHolderView image freeze fix
InfinitePlaceHolderView: This class has been added to show load more style of view loading when the last item has been seen.
SwipePlaceHolderView image freezing when rapid swipe is done is also fixed
RecyclerView update
This version is build upon Support RecyclerView v7:24.+
It's an update from previous RecyclerView v7:23.+
The project using this version should compile using compileSdkVersion 24
Touch Listener bug fix
The fix for touch pointer issue