title: Espresso how to click on a ImageView placed in listview's first item?
body: <p>I have a custom layout for listview, I want to click on a imageview placed in the list view item, overflow icon of the first item in the list view.</p>
  
  <p>I want to click on last imageview with id "rcOverflow"</p>
  
  <p>My layout,</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:gravity="left"
  android:paddingBottom="10dp"
  android:paddingTop="5dp"&gt;
  
  &lt;ImageView
      android:id="@+id/rcCircle"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignWithParentIfMissing="true"
      android:layout_alignParentTop="true" /&gt;
  
  &lt;TextView
      android:id="@+id/rcTime"
      android:layout_width="80dp"
      android:layout_height="wrap_content"
      android:layout_marginTop="20dp"
      android:gravity="right"
      android:maxLines="1"
      android:textColor="#ffffff"
      android:textSize="13sp" /&gt;
  
  &lt;RelativeLayout
      android:id="@+id/rsBubble"
      android:layout_width="280dp"
      android:layout_height="wrap_content"
      android:layout_alignWithParentIfMissing="true"
      android:layout_below="@id/recordsMonthHeader"
      android:paddingBottom="16dp"
      android:paddingTop="16dp"&gt;
  
      &lt;ImageView
          android:id="@+id/rcImage"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:adjustViewBounds="true"
          android:layout_alignParentTop="true"
          android:visibility="gone"
          android:layout_marginLeft="3dp"
          android:layout_marginRight="4dp"/&gt;
  
      &lt;TextView
          android:id="@+id/rcFilename"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginTop="5dp"
          android:layout_alignParentLeft="true"
          android:layout_marginLeft="10dp"
          android:textColor="#000000"
          android:maxLines="2"
          android:ellipsize="end"
          android:textSize="15sp" /&gt;
  
      &lt;TextView
          android:id="@+id/rcDuration"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_below="@id/recordsFilename"
          android:layout_marginLeft="10dp"
          android:layout_marginTop="2dp"
          android:textColor="#a09f9f" /&gt;
  
      &lt;ImageView
          android:id="@+id/records_location_image"
          android:layout_width="12dp"
          android:layout_height="12dp"
          android:layout_alignBottom="@id/recordsDuration"
          android:layout_marginBottom="4dp" /&gt;
  
      &lt;TextView
          android:id="@+id/rcLocation"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@id/recordsDuration"
          android:layout_marginBottom="1dp"
          android:layout_marginLeft="3dp"
          android:layout_marginTop="2dp"
          android:ellipsize="end"
          android:lines="1"
          android:textColor="#a09f9f"
          android:textSize="12sp"
          android:visibility="gone" /&gt;
  
      &lt;TextView
          android:id="@+id/rcTag"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_below="@id/recordsDuration"
          android:layout_marginLeft="10dp"
          android:layout_marginTop="3dp"
          android:textColor="#a09f9f"
          android:textSize="12sp"
          android:visibility="gone" /&gt;
  
      &lt;ImageView
          android:id="@+id/rcOverflow"
          android:layout_width="32dp"
          android:layout_height="32dp"
          android:layout_below="@+id/recordsImage"
          android:layout_alignParentRight="true"
          android:layout_alignWithParentIfMissing="true"
          android:background="?android:attr/selectableItemBackground"
          android:src="@drawable/overflow" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>what I tried</p>
  
  <pre><code>onData(anything()).inAdapterView(withId(getId("recorderlistpage_listView")))
  .perform(click());
  </code></pre>
  
  <p>or </p>
  
  <pre><code>onData(anything()).atPosition(0).inAdapterView(withId(getId("rcOverflow")))
  .perform(click());
  </code></pre>
  
  <p>both not working</p>