-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Added a OnPageChangeListener to the SliderLayout #100
Conversation
The bundle for the textSliderView was never created so the Toast would crash in the onSliderClick method when trying to retrieve the "extra" from the null bundle
I made another small fix and the commit showed up here. |
Great job! I think there also need a method to |
@zhouqiangWang Please check this closed PR 's comment to know why we need an ArrayList to manage listener. #98 |
Yes makes sense, but how would a user know that behind the scenes we implemented the multiple listeners? |
@massimobio I think the easiest way to make user know there is an arraylist managing their Listener is to change the name from |
It's the right way to indicate and handle multiple listener
Very good point. I updated my pull request. |
@massimobio One more thing, the method name Using trigger prefix is much easy to understand this method when developer at first glance. |
Just boarding a long flight. Will take care of it tomorrow. Thank you for your insightful input. |
Have a good sleep. It's not very urgent. The ViewPagerEx is the source code of ViewPager actually. The comments are all added by google's developer. SliderLayout should have clear comments. This is an early library I made, I didn't think too much on this. It now seems not right. |
@daimajia I absolutely agree with you. Building a library is very much different that coding for your own app, and should follow widely agreed upon conventions as much as possible. |
Added a OnPageChangeListener to the SliderLayout
@massimobio Great! Thanks for your working on this project. How about to be a collaborator of this project? |
@daimajia sure, if you think I can be helpful. I'll try my best. |
@massimobio Actually the version is still 1.0.9, v1.1.2 is gradle version instead of the library version. https://github.com/daimajia/AndroidImageSlider/blob/master/library/build.gradle#L11 I'll publish a new release this weekend. :-D |
Great, I'll answer and close the related issues to this pull. |
@massimobio Your workflow is also right ( working on your own branch and then send pull request), just make sure that collaborators never push code to master branch. I checked the config file again. The version should be v1.1.2, instead of v1.0.9 |
@daimajia Is there a way to have the latest commit of the library compile as a dependency in grade while we wait for the next official release? |
@massimobio I have successfully push v1.1.5 to maven center. Have a try. :-D |
I implemented the ArrayList of listeners in ViewPagerEx as you recommended and used the item count in the InfinitePager to calculate the page number.
I also implemented the listener in the demo with a simple log.