Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
techyrajeev opened this issue Oct 18, 2017 · 0 comments
Open

Comments

@techyrajeev
Copy link

techyrajeev commented Oct 18, 2017

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant