Skip to content

Commit 026c72f

Browse files
committed
Code cleanup.
1 parent de2738a commit 026c72f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

navigationtabbar/src/main/java/com/gigamole/navigationtabbar/ntb/NavigationTabBar.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,10 +792,13 @@ public void setModelIndex(int index) {
792792
}
793793

794794
// Set model index from touch or programmatically
795-
public void setModelIndex(int index, boolean force) {
795+
public void setModelIndex(final int modelIndex, final boolean isForce) {
796796
if (mAnimator.isRunning()) return;
797797
if (mModels.isEmpty()) return;
798798

799+
int index = modelIndex;
800+
boolean force = isForce;
801+
799802
// This check gives us opportunity to have an non selected model
800803
if (mIndex == INVALID_INDEX) force = true;
801804
// Detect if last is the same
@@ -1466,8 +1469,6 @@ private void updateTint() {
14661469

14671470
@Override
14681471
public void onPageScrolled(int position, float positionOffset, final int positionOffsetPixels) {
1469-
//Fix the wrong position problem for some devices
1470-
position = position + (int) positionOffset;
14711472
if (mOnPageChangeListener != null)
14721473
mOnPageChangeListener.onPageScrolled(position, positionOffset, positionOffsetPixels);
14731474

0 commit comments

Comments
 (0)