Question

I have two ListViews in my Activity. I want to use Robotium to select a row in the second list View. When I use solo.clickonText(), it searches for the item on the first listview. How do I select a row in the second listview ?

Était-ce utile?

La solution

If you want to click on a particular line of your 2nd list view :

solo.clickInList(int line, 1);

If you want to click on a text in the 2nd list view :

while(!solo.searchText(text_to_click))
{
solo.scrollDownList(1);
}
solo.clickOnText(text_to_click);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top