fix(tabs-android): wrong tabStripItem selected (#7522)

This commit is contained in:
Alexander Djenkov
2019-07-16 10:18:01 +03:00
committed by GitHub
parent 16924f4112
commit ca22ba9391
2 changed files with 11 additions and 11 deletions

View File

@@ -383,7 +383,11 @@ public class TabLayout extends HorizontalScrollView {
}
int prevPosition = mTabStrip.getSelectedPosition();
onSelectedPositionChange(position, prevPosition);
if (prevPosition != position) {
onSelectedPositionChange(position, prevPosition);
}
mTabStrip.onViewPagerPageChanged(position, positionOffset);
View selectedTitle = mTabStrip.getChildAt(position);