-
Notifications
You must be signed in to change notification settings - Fork 29
SwipeMenu
Roman Tcaregorodtcev edited this page Oct 30, 2019
·
1 revision
To add swipe menu into project you need to use SwipeViewHolder or create your own ViewHolder.
public class ViewHolder extends SwipeViewHolder {
public ViewHolder(ViewGroup parent) {
super(parent,
R.layout.item_swipe_content,
R.layout.item_left_swipe_menu,
R.layout.item_right_swipe_menu);
}
You can use constructor only with left menu, or only with right menu.
public ViewHolder(ViewGroup parent) {
super(parent,
R.layout.item_swipe_content,
R.layout.item_left_swipe_menu,
SwipeViewHolder.NO_ID);
}
Also you can use one layout for left menu and right menu.
public ViewHolder(ViewGroup parent) {
super(parent,
R.layout.item_swipe_content,
R.layout.swipe_menu);
}
public void smoothCloseMenu(int duration);
public void smoothCloseMenu();
public void smoothOpenMenu(SwipeDirection direction);
public void smoothOpenLeftMenu();
public void smoothOpenRightMenu();
public void setSwipeEnable(boolean enable);
public void setLeftSwipeEnable(boolean enable);
public void setRightSwipeEnable(boolean enable);
public boolean isSwipeEnable();
public boolean isLeftSwipeEnable();
public boolean isRightSwipeEnable();
- SwipeFractionListener
public interface SwipeFractionListener {
void onSwipeMenuFraction(SwipeMenuLayout swipeMenuLayout, SwipeDirection direction, float fraction);
}
- SwipeSwitchListener
public interface SwipeSwitchListener {
void onSwipeMenuOpened(SwipeMenuLayout swipeMenuLayout, SwipeDirection direction);
void onSwipeMenuClosed(SwipeMenuLayout swipeMenuLayout, SwipeDirection direction);
}
-
- ViewPager Transformers
- AccordionTransformer
- BackgroundToForegroundTransformer
- CubeInTransformer
- CubeOutTransformer
- DepthPageTransformer
- FadeTransformer
- FlipTransformer
- ForegroundToBackground
- RotateDownTransformer
- RotateUpTransformer
- StackTransformer
- TabletTransformer
- ZoomInTransformer
- ZoomOutSlideTransformer