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'sTabLayout
method.
BottomBar
with aViewPager
you implemented inyour app. And change behaviour of other when one changes.
ViewPager
will be updated. IfViewPager
is updated Tab will be selected accordingly.setUpWithViewPager()
and you have to passViewPager
instance, no extra implementation required.ViewPagerActivity
for 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.ViewPager
will cause this feature fail to work properly.BottomBar
class, following code changes are made:ViewPager
private member declarationsetUpViewPagerMethod()
which has listener toOnPageChange
, ifViewPager
member 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,
ViewPager
will also be updated.If
ViewPager
is 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.