title: Espresso can't find a View inside a custom view class
body: <p>I have a custom <code>View</code> class <code>public class Foo extends RelativeLayout{...}</code> which have an <code>EditText</code> in it. The <code>Foo</code> class have a XML layout inflated and its <code>EditText</code> also have an id but its not able to find the <code>EditText</code></p>
  
  <p>I'm using this Espresso code:</p>
  
  <pre><code>onView(allOf(withId(R.id.edittext), withParent(withId(R.id.name_container)))).check(matches(isDisplayed())).perform(click());
  </code></pre>
  
  <p>And the error message I get is: </p>
  
  <blockquote>
    <p>android.support.test.espresso.NoMatchingViewException: No views in
    hierarchy found matching: (with id: dk.aura.app.staging:id/edittext
    and has parent matching: with id:
    dk.aura.app.staging:id/name_container)</p>
  </blockquote>