title: Espresso. Error performing 'load adapter data'
body: <p>I have a ListView, which shows data from a database.</p>
  
  <pre><code>    db = new DB(this);
      db.open();
  
  
      String[] from = new String[]{DB.COLUMN_FIRSTNAME, DB.COLUMN_LASTNAME};
      int[] to = new int[]{android.R.id.text1, android.R.id.text2};        
  
      scAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_activated_2, null, from, to, 0);
      lvData = (ListView) findViewById(R.id.lvData);
      lvData.setAdapter(scAdapter);
  
      lvData.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
      lvData.setMultiChoiceModeListener(new AbsListView.MultiChoiceModeListener() {
  </code></pre>
  
  <p>It shows the first name and last name from the database as a list of items:
  <a href="https://i.stack.imgur.com/LcBaa.jpg" rel="noreferrer">Click to UI</a></p>
  
  <p>So, today I tried to use Espresso with this app and I can't find a way to click on the item containing the text. </p>
  
  <p>When I use:</p>
  
  <pre><code>onData(anything())
      .inAdapterView(withId(R.id.lvData))
      .atPosition(3)
      .perform(click());
  </code></pre>
  
  <p>It works perfectly. But I want to click on the item containing the corresponding item's text.</p>
  
  <p>What I tried so far (everything I've found at stackoverflow, google, github, etc.):</p>
  
  <pre><code>onView(allOf(withText("Ivan Ivanov"))).perform(click())
  
  onData(allOf(is(instanceOf(MainActivity.class)),is("Ivan Ivanov")))
              .inAdapterView(withId(R.id.lvData))
              .perform(click());
  
  onData(hasToString(startsWith("v")))
              .inAdapterView(withId(R.id.lvData))
              .atPosition(0).perform(click());
  
  onData(instanceOf(MainActivity.class))
              .inAdapterView(withId(R.id.lvData))
              .atPosition(0)
              .check(matches(hasDescendant(withText("Ivan Ivanov"))));
  
  onData(anything()).inAdapterView(withContentDescription("Ivan Ivanov"))
              .atPosition(0).perform(click());
  </code></pre>
  
  <p>So, maybe is there are differences between the string "Ivan Ivanov" and the item, which contains data from the database: <code>firstName</code>+<code>lastName</code>?</p>