janishar / PlaceHolderView

This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->
http://janishar.com/PlaceHolderView
Apache License 2.0
2.11k stars 367 forks source link

How to make swipe three direction in case i have three button #160

Open hafiz013 opened 5 years ago

hafiz013 commented 5 years ago

Hi guys, I new here, my question is that if let say below placeholderswipe i got three button which are dislike, fav, like. How to make animation on left (for dislike button), right (for like button) and Top (for fav button) when click those three button.

Below here sample code that I did but I could not found for swipe top for fav button.

mSwipeView.getBuilder() .setSwipeType(SwipePlaceHolderView.SWIPE_TYPE_DEFAULT) .setDisplayViewCount(3) .setSwipeDecor(new SwipeDecor() .setPaddingTop(0) .setRelativeScale(0.01f) .setSwipeInMsgLayoutId(R.layout.swipe_left) .setSwipeOutMsgLayoutId(R.layout.swipe_right) .setSwipeInMsgGravity(Gravity.LEFT) .setSwipeOutMsgGravity(Gravity.RIGHT) .setSwipeAnimTime(1000) );

ic_fav

ic_x_op

ic_heart_op

janishar commented 5 years ago

Use SwipeDirectionalView: refer doc -> https://janishar.com/PlaceHolderView/docs/sdv-intro.html