{"action":"opened","issue":{"url":"https://api.github.com/repos/RobotiumTech/robotium/issues/312","labels_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/312/comments","events_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/312/events","html_url":"https://github.com/RobotiumTech/robotium/issues/312","id":101946654,"number":312,"title":"Text search in multiple list fragments fails","user":{"login":"renas","id":165541,"avatar_url":"https://avatars.githubusercontent.com/u/165541?v=3","gravatar_id":"","url":"https://api.github.com/users/renas","html_url":"https://github.com/renas","followers_url":"https://api.github.com/users/renas/followers","following_url":"https://api.github.com/users/renas/following{/other_user}","gists_url":"https://api.github.com/users/renas/gists{/gist_id}","starred_url":"https://api.github.com/users/renas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renas/subscriptions","organizations_url":"https://api.github.com/users/renas/orgs","repos_url":"https://api.github.com/users/renas/repos","events_url":"https://api.github.com/users/renas/events{/privacy}","received_events_url":"https://api.github.com/users/renas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/bug","name":"bug","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-19T16:59:42Z","updated_at":"2015-08-19T16:59:43Z","closed_at":null,"body":"_From [josefaic...@gmail.com](https://code.google.com/u/102587956281232772897/) on March 12, 2012 09:24:32_\n\nWhat steps will reproduce the problem? 1. Create a view pager with a couple of list fragments\r\n2. Make sure that first list fragment is scrolled out of the screen\r\n3. search for a text view which occurs in the second fragment\r\n4. ViewFetcher.getView will return the first list view instead of the second one although first one has negative absolute coordinates. Scroller will then try to scroll the wrong list. What is the expected output? What do you see instead? I would like to see the second list view scroll. I see that the current visible one does not scroll at all. Adding debug output showed that the list that is currently off-screen was scrolled instead. What version of the product are you using? On what operating system? 3.1, OS is 2.2 Please provide any additional information below. I can imagine a fix for like this:\r\n\tpublic final \\<T extends View> T getView(Class<T> classToFilterBy, ArrayList<T> views){\r\n\t\tT viewToReturn = null;\r\n\t\tlong drawingTime = 0;\r\n\t\tif(views == null){\r\n\t\t\tviews = RobotiumUtils.removeInvisibleViews(getCurrentViews(classToFilterBy));\r\n\t\t}\r\n\t\tfor(T view : views){\r\n\t\t\tint[] locationOnScreen =  new int[2];\r\n\t\t\tview.getLocationOnScreen(locationOnScreen);\r\n\t\t\tif (locationOnScreen[0] \\< 0) {\r\n\t\t\t\tcontinue;\r\n\r\n\r\nHowever, it probably needs to be extended so that it also covers lists that are to right side of the current visible one. Visible means visible to the user.\n\n_Original issue: http://code.google.com/p/robotium/issues/detail?id=233_"}}