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

fix conflict of RecyclerView's and ViewPager's lifecycles #44

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

Conversation

shpp-vsmaga
Copy link
Contributor

Hello. I found one more little bug - I use your view in few places of my application and recently found that delete button don't work (visible bun not delete numbers) when PinLockView placed in fragment what placed in view pager. In this case - method of RecyclerViewAdapter onBindViewHolder called many times and all business logic (like OnClickListeners and others) placed in ViewHolder class stop to work. Definitely it's not good idea to place any business logic in ViewHolder class, it must be used only to store inflated views and no more.. Due to RecyclerView's lifecycle all business logic must be implemented in onBindViewHolder() for correct work. In my commit I moved all your business logic from constructors of ViewHolders to methods called from onBindViewHolder. Please check my changes and merge it. Thank you for your beautiful library.

…e to RecyclerView lifecycle to fix bugwith delete button when PinLockView placed in ViewPager
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.

1 participant