com.h6ah4i.android.widget.advrecyclerview.swipeable.SwipeableItemViewHolder |
Known Indirect Subclasses |
Interface which provides required information for swiping item.
Implement this interface on your sub-class of the android.support.v7.widget.RecyclerView.ViewHolder.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract int |
getAfterSwipeReaction()
Gets the reaction type of after swiping item.
| ||||||||||
abstract float |
getMaxDownSwipeAmount()
Gets the maximum item down swipe amount.
| ||||||||||
abstract float |
getMaxLeftSwipeAmount()
Gets the maximum item left swipe amount.
| ||||||||||
abstract float |
getMaxRightSwipeAmount()
Gets the maximum item right swipe amount.
| ||||||||||
abstract float |
getMaxUpSwipeAmount()
Gets the maximum item up swipe amount.
| ||||||||||
abstract float |
getSwipeItemHorizontalSlideAmount()
Gets the amount of horizontal swipe.
| ||||||||||
abstract float |
getSwipeItemVerticalSlideAmount()
Gets the amount of vertical swipe.
| ||||||||||
abstract int |
getSwipeResult()
Gets the result code of swiping item.
| ||||||||||
abstract int |
getSwipeStateFlags()
Gets the state flags value for swiping item
| ||||||||||
abstract View |
getSwipeableContainerView()
Gets the container view for the swipeable area.
| ||||||||||
abstract boolean |
isProportionalSwipeAmountModeEnabled()
Gets whether the proportional swipe amount mode enabled.
| ||||||||||
abstract void |
onSlideAmountUpdated(float horizontalAmount, float verticalAmount, boolean isSwiping)
Called when sets background of the swiping item.
| ||||||||||
abstract void |
setAfterSwipeReaction(int reaction)
Sets the reaction type of after swiping item.
| ||||||||||
abstract void |
setMaxDownSwipeAmount(float amount)
Sets the maximum item down swipe amount.
| ||||||||||
abstract void |
setMaxLeftSwipeAmount(float amount)
Sets the maximum item left swipe amount.
| ||||||||||
abstract void |
setMaxRightSwipeAmount(float amount)
Sets the maximum item right swipe amount.
| ||||||||||
abstract void |
setMaxUpSwipeAmount(float amount)
Sets the maximum item up swipe amount.
| ||||||||||
abstract void |
setProportionalSwipeAmountModeEnabled(boolean enabled)
Sets proportional swipe amount mode enabled.
| ||||||||||
abstract void |
setSwipeItemHorizontalSlideAmount(float amount)
Sets the amount of horizontal swipe.
| ||||||||||
abstract void |
setSwipeItemVerticalSlideAmount(float amount)
Sets the amount of vertical swipe.
| ||||||||||
abstract void |
setSwipeResult(int result)
Sets the result code of swiping item.
| ||||||||||
abstract void |
setSwipeStateFlags(int flags)
Sets the state flags value for swiping item
|
Gets the reaction type of after swiping item.
AFTER_SWIPE_REACTION_DEFAULT
- AFTER_SWIPE_REACTION_MOVE_TO_ORIGIN
- AFTER_SWIPE_REACTION_REMOVE_ITEM
- AFTER_SWIPE_REACTION_MOVE_TO_SWIPED_DIRECTION
- AFTER_SWIPE_REACTION_DO_NOTHING
Gets the maximum item down swipe amount.
Gets the maximum item left swipe amount.
Gets the maximum item right swipe amount.
Gets the maximum item up swipe amount.
Gets the amount of horizontal swipe.
OUTSIDE_OF_THE_WINDOW_LEFT
- OUTSIDE_OF_THE_WINDOW_RIGHT
Gets the amount of vertical swipe.
OUTSIDE_OF_THE_WINDOW_TOP
- OUTSIDE_OF_THE_WINDOW_BOTTOM
Gets the result code of swiping item.
RESULT_NONE
- RESULT_SWIPED_LEFT
- RESULT_SWIPED_UP
- RESULT_SWIPED_RIGHT
- RESULT_SWIPED_DOWN
- RESULT_CANCELED
Gets the state flags value for swiping item
STATE_FLAG_SWIPING
- STATE_FLAG_IS_ACTIVE
- STATE_FLAG_IS_UPDATED
Gets the container view for the swipeable area.
NOTE: Please DO NOT return itemView
for this method.
An IllegalArgumentException with massage "Tmp detached view should be removed from RecyclerView before it can be recycled"
will be raised by RecyclerView.Recycler.
Gets whether the proportional swipe amount mode enabled.
Called when sets background of the swiping item.
horizontalAmount | Horizontal slide amount of the item view. (slide left: < 0, slide right: 0 >) |
---|---|
verticalAmount | Vertical slide amount of the item view. (slide up: < 0, slide down: 0 >) |
isSwiping | Indicates whether the user is swiping the item or not |
Sets the reaction type of after swiping item.
reaction | After-reaction type. One of these values;
- AFTER_SWIPE_REACTION_DEFAULT
- AFTER_SWIPE_REACTION_MOVE_TO_ORIGIN
- AFTER_SWIPE_REACTION_REMOVE_ITEM
- AFTER_SWIPE_REACTION_MOVE_TO_SWIPED_DIRECTION
- AFTER_SWIPE_REACTION_DO_NOTHING
|
---|
Sets the maximum item down swipe amount.
amount | Item swipe amount. If the item is configured as proportional amount mode, specify limit amount in range of [-1.0 .. 1.0]. Otherwise, specify limit distance in pixels. |
---|
Sets the maximum item left swipe amount.
amount | Item swipe amount. If the item is configured as proportional amount mode, specify limit amount in range of [-1.0 .. 1.0]. Otherwise, specify limit distance in pixels. |
---|
Sets the maximum item right swipe amount.
amount | Item swipe amount. If the item is configured as proportional amount mode, specify limit amount in range of [-1.0 .. 1.0]. Otherwise, specify limit distance in pixels. |
---|
Sets the maximum item up swipe amount.
amount | Item swipe amount. If the item is configured as proportional amount mode, specify limit amount in range of [-1.0 .. 1.0]. Otherwise, specify limit distance in pixels. |
---|
Sets proportional swipe amount mode enabled.
enabled | True if swipe amount is specified in proportional value, otherwise amount is specified in pixels. |
---|
Sets the amount of horizontal swipe.
amount | Item swipe amount. Generally the range is [-1.0 .. 1.0] if the proportional amount mode is enabled, otherwise distance in pixels.
In additionally, these special values can also be accepted;
- OUTSIDE_OF_THE_WINDOW_LEFT
- OUTSIDE_OF_THE_WINDOW_RIGHT
|
---|
Sets the amount of vertical swipe.
amount | Item swipe amount. Generally the range is [-1.0 .. 1.0] if the proportional amount mode is enabled, otherwise distance in pixels.
In additionally, these special values can also be accepted;
- OUTSIDE_OF_THE_WINDOW_TOP
- OUTSIDE_OF_THE_WINDOW_BOTTOM
|
---|
Sets the result code of swiping item.
result | Result code. One of these values;
- RESULT_NONE
- RESULT_SWIPED_LEFT
- RESULT_SWIPED_UP
- RESULT_SWIPED_RIGHT
- RESULT_SWIPED_DOWN
- RESULT_CANCELED
|
---|
Sets the state flags value for swiping item
flags | Bitwise OR of these flags;
- STATE_FLAG_SWIPING
- STATE_FLAG_IS_ACTIVE
- STATE_FLAG_IS_UPDATED
|
---|