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

HorizontalListView improvements #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MasterMeyer
Copy link

  • added possibility to snap to center
  • added possibility to endless scroll in a circle
  • performance optimization: no use of requestLayout to redraw the view
    for scrolling - since i used the view deep in some view hierarchy and it
    lead to problems
  • added some comments
  • implemented the setSelection method to center the selected View number
  • added getSelected... methods which return the centered View / index

- added possibility to snap to center
- added possibility to endless scroll in a circle
- performance optimization: no use of requestLayout to redraw the view
for scrolling - since i used the view deep in some view hierachy and it
lead to problems
@kenticus
Copy link

I can confirm that this commit does all that it describes. I'm using it now, and it works great.

@waynem81
Copy link

waynem81 commented May 7, 2014

I want to be able to implement snap to center. The original code works, but I get a null pointer exception error when implementing this updated code...

FATAL EXCEPTION: main
java.lang.NullPointerException
com.devsmart.android.ui.HorizontalListViewWithSnap.setSelection(HorizontalListView.java:248)
com.devsmart.android.ui.HorizontalListView.onSizeChanged(HorizontalListViewWithSnap.java:145)

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

Successfully merging this pull request may close these issues.

3 participants