public final class

ViewPagerActions

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

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static ViewAction clickBetweenTwoTitles (String title1, String title2)

Clicks between two titles in a ViewPager title strip

Parameters
title1 String
title2 String
Returns
ViewAction

public static ViewAction scrollLeft (boolean smoothScroll)

Moves ViewPager to the left by one page.

Parameters
smoothScroll boolean
Returns
ViewAction

public static ViewAction scrollLeft ()

Moves ViewPager to the left be one page.

Returns
ViewAction

public static ViewAction scrollRight ()

Moves ViewPager to the right be one page.

Returns
ViewAction

public static ViewAction scrollRight (boolean smoothScroll)

Moves ViewPager to the right by one page.

Parameters
smoothScroll boolean
Returns
ViewAction

public static ViewAction scrollToFirst (boolean smoothScroll)

Moves ViewPager to the first page.

Parameters
smoothScroll boolean
Returns
ViewAction

public static ViewAction scrollToFirst ()

Moves ViewPager to the first page.

Returns
ViewAction

public static ViewAction scrollToLast (boolean smoothScroll)

Moves ViewPager to the last page.

Parameters
smoothScroll boolean
Returns
ViewAction

public static ViewAction scrollToLast ()

Moves ViewPager to the last page.

Returns
ViewAction

public static ViewAction scrollToPage (int page)

Moves ViewPager to a specific page.

Parameters
page int
Returns
ViewAction

public static ViewAction scrollToPage (int page, boolean smoothScroll)

Moves ViewPager to specific page.

Parameters
page int
smoothScroll boolean
Returns
ViewAction