Summary
| Nested Classes |
|
interface |
RecyclerViewActions.PositionableRecyclerViewAction |
Most RecyclerViewActions are given a matcher to select a particular view / viewholder within
the RecyclerView. |
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
Public Methods
Performs a ViewAction on a view matched by viewHolderMatcher.
- Scroll Recycler View to the view matched by itemViewMatcher
- Perform an action on the matched view
Note: actionOnItem method is not overloaded, method overloading with
generic parameters is not possible.
| Parameters |
viewHolderMatcher |
Matcher: a
Matcher that matches an item view holder in RecyclerView |
viewAction |
ViewAction: the action that is performed on the view matched by viewHolderMatcher |
| Throws |
PerformException |
if there are more than one items matching given viewHolderMatcher.
|
Performs a ViewAction on a view matched by viewHolderMatcher.
- Scroll Recycler View to the view matched by itemViewMatcher
- Perform an action on the matched view
| Parameters |
itemViewMatcher |
Matcher: a
Matcher that matches an item view in RecyclerView |
viewAction |
ViewAction: the action that is performed on the view matched by itemViewMatcher |
| Throws |
PerformException |
if there are more than one items matching given viewHolderMatcher.
|
public
static
ViewAction
actionOnItemAtPosition
(int position, ViewAction viewAction)
Performs a ViewAction on a view at position.
- Scroll Recycler View to position
- Perform an action on the view at position
| Parameters |
position |
int: position of a view in RecyclerView |
viewAction |
ViewAction: the action that is performed on the view matched by itemViewMatcher
|
Returns a ViewAction which scrolls RecyclerView to the view matched by
itemViewMatcher.
This approach uses RecyclerView.ViewHolders to find the target view. It will create one ViewHolder
per item type and bind adapter data to the ViewHolder. If the itemViewMatcher matches a
ViewHolder the current position of the View is used to perform a
scrollToPosition(int).
| Throws |
PerformException |
if there are more than one items matching given viewHolderMatcher.
|
Returns a ViewAction which scrolls RecyclerView to the view matched by
viewHolderMatcher.
This approach uses RecyclerView.ViewHolders to find the target view. It will create one ViewHolder
per item type and bind adapter data to the ViewHolder. If the itemViewMatcher matches a
ViewHolder the current position of the View is used to perform a
scrollToPosition(int). Note: scrollTo method is not overloaded, method
overloading with generic parameters is not possible.
| Parameters |
viewHolderMatcher |
Matcher: a
Matcher that matches an item view holder in RecyclerView |
| Throws |
PerformException |
if there are more than one items matching given viewHolderMatcher.
|
public
static
ViewAction
scrollToPosition
(int position)
Returns a ViewAction which scrolls RecyclerView to a position.
| Parameters |
position |
int: the position of the view to scroll to
|