java.lang.Object | ||
↳ | android.support.v7.widget.RecyclerView.ViewHolder | |
↳ | com.h6ah4i.android.widget.advrecyclerview.utils.AbstractSwipeableItemViewHolder |
Known Direct Subclasses |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v7.widget.RecyclerView.ViewHolder
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractSwipeableItemViewHolder(View itemView) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getAfterSwipeReaction()
Gets the reaction type of after swiping item.
| ||||||||||
float |
getMaxDownSwipeAmount()
Gets the maximum item down swipe amount.
| ||||||||||
float |
getMaxLeftSwipeAmount()
Gets the maximum item left swipe amount.
| ||||||||||
float |
getMaxRightSwipeAmount()
Gets the maximum item right swipe amount.
| ||||||||||
float |
getMaxUpSwipeAmount()
Gets the maximum item up swipe amount.
| ||||||||||
float |
getSwipeItemHorizontalSlideAmount()
Gets the amount of horizontal swipe.
| ||||||||||
float |
getSwipeItemVerticalSlideAmount()
Gets the amount of vertical swipe.
| ||||||||||
int |
getSwipeResult()
Gets the result code of swiping item.
| ||||||||||
int |
getSwipeStateFlags()
Gets the state flags value for swiping item
| ||||||||||
abstract View |
getSwipeableContainerView()
Gets the container view for the swipeable area.
| ||||||||||
boolean |
isProportionalSwipeAmountModeEnabled()
Gets whether the proportional swipe amount mode enabled.
| ||||||||||
void |
onSlideAmountUpdated(float horizontalAmount, float verticalAmount, boolean isSwiping)
Called when sets background of the swiping item.
| ||||||||||
void |
setAfterSwipeReaction(int reaction)
Sets the reaction type of after swiping item.
| ||||||||||
void |
setMaxDownSwipeAmount(float amount)
Sets the maximum item down swipe amount.
| ||||||||||
void |
setMaxLeftSwipeAmount(float amount)
Sets the maximum item left swipe amount.
| ||||||||||
void |
setMaxRightSwipeAmount(float amount)
Sets the maximum item right swipe amount.
| ||||||||||
void |
setMaxUpSwipeAmount(float amount)
Sets the maximum item up swipe amount.
| ||||||||||
void |
setProportionalSwipeAmountModeEnabled(boolean enabled)
Sets proportional swipe amount mode enabled.
| ||||||||||
void |
setSwipeItemHorizontalSlideAmount(float amount)
Sets the amount of horizontal swipe.
| ||||||||||
void |
setSwipeItemVerticalSlideAmount(float amount)
Sets the amount of vertical swipe.
| ||||||||||
void |
setSwipeResult(int result)
Sets the result code of swiping item.
| ||||||||||
void |
setSwipeStateFlags(int flags)
Sets the state flags value for swiping item
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v7.widget.RecyclerView.ViewHolder
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.h6ah4i.android.widget.advrecyclerview.swipeable.SwipeableItemViewHolder
|
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
|
---|