AStickyHeader icon indicating copy to clipboard operation
AStickyHeader copied to clipboard

Not able to implement Scroll to grid view index based on user input

Open techyrajeev opened this issue 8 years ago • 0 comments

I am using <dev.dworks.libs.astickyheader.ui.PinnedSectionGridView>. Based on a floating list popup window index click I want to focus ( scroll) to that part of grid view.

I am passing the selection index to go to that section of gridview but nothing seems to happen.

GridView is not scrolling to selected position in grid view.

When selection happens I am saving the current position. int index = gridview.getFirstVisiblePosition(); And when you come back to the gridview then trying to do gridview.smoothScrollToPosition(int index)

                //gridView.setSelection(position);
                int index = gridView.getFirstVisiblePosition();

                ListAdapter adapter = gridView.getAdapter();

                gridView.smoothScrollToPosition(index + position);

techyrajeev avatar Oct 18 '17 14:10 techyrajeev