title: Espresso swipe gesture test fails on android emulator but passes on real device
body: <p>I have been using my phone to run instrumented android tests for a long time. Today I thought I would switch to the emulator, but I found that some tests that pass on my phone do not pass on the emulator -- because the swipe gesture does not do the same thing on the emulator as it does on my phone (Xperia Z5 Compact, Android 7.1.1). I am also running the same version of Android in the emulator.</p>
  
  <p>When run on the emulator the ViewActions.swipeLeft() method seems to start the swipe too far to the right and cause that little wavy animation that happens when you drag from the very edge of the screen at an end of a ViewPager. The swipe works totally fine on the phone and emulator when done manually. Hence, I think it must be something to do with Espresso. I can imagine how perhaps the issue could be the swipe listener in a RecyclerView inside a swipe-able ViewPager. But it works fine on the emulator and phone and tests pass on my phone.</p>
  
  <p>This is my swipe handling code, which is added to a RecyclerView inside a ViewPager tab (on the last tab).</p>
  
  <pre><code>fun attachSingleSwipeActionToRecyclerView(
      direction: Int = ItemTouchHelper.LEFT,
      recyclerView: RecyclerView,
      swipeAction: RecyclerView.ViewHolder.() -&gt; Unit
  ): ItemTouchHelper {
      val simpleCallback = object : ItemTouchHelper.SimpleCallback(0, direction) {
          override fun onMove(
              recyclerView: RecyclerView,
              viewHolder: RecyclerView.ViewHolder,
              target: RecyclerView.ViewHolder
          ): Boolean {
              return false
          }
  
          override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) {
              swipeAction(viewHolder)
          }
      }
  
      val itemTouchHelper = ItemTouchHelper(simpleCallback)
      itemTouchHelper.attachToRecyclerView(recyclerView)
      return itemTouchHelper
  }
  </code></pre>
  
  <p>In my test I am simply calling ViewActions.swipeLeft() on the first RecyclerView item on the screen.</p>
  
  <p>I have tried creating my own start point for the Espresso swipe, even when I made it start at the very center, rather than far right side, nothing changed, including the end of ViewPager wave animation</p>
  
  <pre><code>GeneralSwipeAction(
      Swipe.FAST,
      GeneralLocation.CENTER,
      GeneralLocation.CENTER_LEFT,
      Press.FINGER
  )
  </code></pre>
  
  <p>What could be different about the emulator that causes the espresso swipe to act differently than on a real device?</p>