title: Espresso - Can't find the second button in dropdown MaterialTextView
body: <p>When user clicks a button, two dropdown button appears and they are in a MaterialTextView each. I can access the first element but the second one can never be found. I have even tried switching to UISelector and I still can't find it. Any ideas?</p>
  <p>I can access the first button using:</p>
  <pre><code>private val cardDetailsDropdownButton = onView(allOf(withText(R.string.card_details), withEffectiveVisibility(Visibility.VISIBLE)))
   
  fun tapOnViewCardDetails() {
          viewCardDetailsButton.perform(scrollTo(), click())
          Thread.sleep(2000) // View outside root, have to wait
          cardDetailsDropdownButton.perform(scrollTo(), click())
      }
  </code></pre>
  <p>But the code above with the string from the other button doesn't work. I have tried UISelector but had no luck either:</p>
  <pre><code> private val cardPinDropdownButton : UiObject = device.findObject( // Can't be found without UIAutomator
          UiSelector().textMatches(&quot;Card PIN&quot;)
      )
  
   fun tapShowPinButton() {
          viewCardDetailsButton.perform(scrollTo(), click())
          Thread.sleep(2000) // // View outside root, have to wait
          cardPinDropdownButton.click()
      }
  </code></pre>
  <p>See screenshots of UI below</p>
  <p><a href="https://i.stack.imgur.com/JCSj1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JCSj1.png" alt="UI" /></a></p>
  <p><a href="https://i.stack.imgur.com/9lQ6P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9lQ6P.png" alt="Layout" /></a></p>