I have 30 images on grid view (3 images per row). If user select 20th image and go to next screen and come back then I want to focus to that position. I used following line
solution that worked for me was combine code from Monali and Sreedev (thank you Monali and Sreedev):
private int gridviewVerticalPositionWhenThumbnailTapped;
...
// save vertical position of gridview screen, will use to re-find this location if user follows a usre and gridview gets redrawn
gridviewVerticalPositionWhenThumbnailTapped = gridview.getFirstVisiblePosition();
later in app...
// scroll gridview to vertical position pre user tap follow
gridview.setSelection(gridviewVerticalPositionWhenThumbnailTapped);