We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
NavigatorHelper里面mCurrentIndex没有提供设值的方法,如果viewpager调用了setCurrentItem 导致导航栏默认选中标题跟viewpager的设置不一致。
初始化时候CommonNavigator 里面调用的时候mNavigatorHelper.getCurrentIndex()默认值还是0 与外部viewpager的设置不一致。 @OverRide protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (mAdapter != null) { preparePositionData(); if (mIndicator != null) { mIndicator.onPositionDataProvide(mPositionDataList); } if (mReselectWhenLayout && mNavigatorHelper.getScrollState() == ScrollState.SCROLL_STATE_IDLE) { onPageSelected(mNavigatorHelper.getCurrentIndex()); onPageScrolled(mNavigatorHelper.getCurrentIndex(), 0.0f, 0); } } }
NavigatorHelper增加一个mCurrentIndex赋值方法才行
The text was updated successfully, but these errors were encountered:
No branches or pull requests
NavigatorHelper里面mCurrentIndex没有提供设值的方法,如果viewpager调用了setCurrentItem 导致导航栏默认选中标题跟viewpager的设置不一致。
初始化时候CommonNavigator 里面调用的时候mNavigatorHelper.getCurrentIndex()默认值还是0 与外部viewpager的设置不一致。
@OverRide
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
if (mAdapter != null) {
preparePositionData();
if (mIndicator != null) {
mIndicator.onPositionDataProvide(mPositionDataList);
}
if (mReselectWhenLayout && mNavigatorHelper.getScrollState() == ScrollState.SCROLL_STATE_IDLE) {
onPageSelected(mNavigatorHelper.getCurrentIndex());
onPageScrolled(mNavigatorHelper.getCurrentIndex(), 0.0f, 0);
}
}
}
NavigatorHelper增加一个mCurrentIndex赋值方法才行
The text was updated successfully, but these errors were encountered: