Added a setUpWithViewPager() method in BottomBar class #800
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
setUpWithViewPager()method similar to Android'sTabLayoutmethod.
BottomBarwith aViewPageryou implemented inyour app. And change behaviour of other when one changes.
ViewPagerwill be updated. IfViewPageris updated Tab will be selected accordingly.setUpWithViewPager()and you have to passViewPagerinstance, no extra implementation required.ViewPagerActivityfor example usage. MainActivity has an added button to navigate to this activity.ViewPager.addOnPageChangedListener()inside my method. I dont know anywhere better to put this implementation.ViewPagerwill cause this feature fail to work properly.BottomBarclass, following code changes are made:ViewPagerprivate member declarationsetUpViewPagerMethod()which has listener toOnPageChange, ifViewPagermember is set correctly, this will callselectTabAtPosition(position, true).setUpWithViewPager()has following description in its docs."Set tab behavior with respect to
ViewPager.If tab is changed,
ViewPagerwill also be updated.If
ViewPageris changed, tab will be updated."[UPDATE]
Removed that library since it is not used, it was added when I created
ViewPagerActivity.Moved back to gradle version that original project was using.
Cleaned project before commit.