ViewPagerActions

public final class ViewPagerActions
extends Object

java.lang.Object
   ↳ android.support.test.espresso.contrib.ViewPagerActions


Espresso actions for interacting with a ViewPager.

Summary

Public methods

static ViewAction clickBetweenTwoTitles(String title1, String title2)

Clicks between two titles in a ViewPager title strip

static ViewAction scrollLeft(boolean smoothScroll)

Moves ViewPager to the left by one page.

static ViewAction scrollLeft()

Moves ViewPager to the left be one page.

static ViewAction scrollRight()

Moves ViewPager to the right be one page.

static ViewAction scrollRight(boolean smoothScroll)

Moves ViewPager to the right by one page.

static ViewAction scrollToFirst(boolean smoothScroll)

Moves ViewPager to the first page.

static ViewAction scrollToFirst()

Moves ViewPager to the first page.

static ViewAction scrollToLast(boolean smoothScroll)

Moves ViewPager to the last page.

static ViewAction scrollToLast()

Moves ViewPager to the last page.

static ViewAction scrollToPage(int page)

Moves ViewPager to a specific page.

static ViewAction scrollToPage(int page, boolean smoothScroll)

Moves ViewPager to specific page.

Inherited methods

From class java.lang.Object

Public methods

clickBetweenTwoTitles

ViewAction clickBetweenTwoTitles (String title1, 
                String title2)

Clicks between two titles in a ViewPager title strip

Parameters
title1 String

title2 String

Returns
ViewAction

scrollLeft

ViewAction scrollLeft (boolean smoothScroll)

Moves ViewPager to the left by one page.

Parameters
smoothScroll boolean

Returns
ViewAction

scrollLeft

ViewAction scrollLeft ()

Moves ViewPager to the left be one page.

Returns
ViewAction

scrollRight

ViewAction scrollRight ()

Moves ViewPager to the right be one page.

Returns
ViewAction

scrollRight

ViewAction scrollRight (boolean smoothScroll)

Moves ViewPager to the right by one page.

Parameters
smoothScroll boolean

Returns
ViewAction

scrollToFirst

ViewAction scrollToFirst (boolean smoothScroll)

Moves ViewPager to the first page.

Parameters
smoothScroll boolean

Returns
ViewAction

scrollToFirst

ViewAction scrollToFirst ()

Moves ViewPager to the first page.

Returns
ViewAction

scrollToLast

ViewAction scrollToLast (boolean smoothScroll)

Moves ViewPager to the last page.

Parameters
smoothScroll boolean

Returns
ViewAction

scrollToLast

ViewAction scrollToLast ()

Moves ViewPager to the last page.

Returns
ViewAction

scrollToPage

ViewAction scrollToPage (int page)

Moves ViewPager to a specific page.

Parameters
page int

Returns
ViewAction

scrollToPage

ViewAction scrollToPage (int page, 
                boolean smoothScroll)

Moves ViewPager to specific page.

Parameters
page int

smoothScroll boolean

Returns
ViewAction