private void checkPostsDisplayOnRecyclerView(List<Post> postsToCheck,int position){
  int columnCount=5;
  int size=postsToCheck.size() + position;
  int pos=0;
  for (int i=position; i < size; i++) {
    checkItemAtPosition(i,postsToCheck.get(pos));
    if (((i + 1) % columnCount) == 0) {
      int nextRowStart=i + columnCount;
      int nextRowEnd=nextRowStart - columnCount + 1;
      for (int n=nextRowStart; n >= nextRowEnd; n--) {
        checkItemAtPosition(n,postsToCheck.get(n - position));
      }
      i=i + columnCount;
    }
    pos++;
  }
}

private void checkPostsDisplayOnRecyclerView ( List < Post > postsToCheck , int position ) { int columnCount = 5 ; int size = postsToCheck . size ( ) + position ; int pos = 0 ; for ( int i = position ; i < size ; i ++ ) { checkItemAtPosition ( i , postsToCheck . get ( pos ) ) ; if ( ( ( i + 1 ) % columnCount ) == 0 ) { int nextRowStart = i + columnCount ; int nextRowEnd = nextRowStart - columnCount + 1 ; for ( int n = nextRowStart ; n >= nextRowEnd ; n -- ) { checkItemAtPosition ( n , postsToCheck . get ( n - position ) ) ; } i = i + columnCount ; } pos ++ ; } }
this method checks that the given list of posts display within the verticalgridview . at the time of writing this , recyclerviewactions is really buggy with grid based recycler views - so this method traverses through the rows of the grid ( starting at left - to - right , then right - to - left and vice versa ) . this isn ' t ideal , but currently proper testing doesn ' t seem supported .
