File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
navigationtabbar/src/main/java/com/gigamole/navigationtabbar/ntb Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -792,10 +792,13 @@ public void setModelIndex(int index) {
792
792
}
793
793
794
794
// 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 ) {
796
796
if (mAnimator .isRunning ()) return ;
797
797
if (mModels .isEmpty ()) return ;
798
798
799
+ int index = modelIndex ;
800
+ boolean force = isForce ;
801
+
799
802
// This check gives us opportunity to have an non selected model
800
803
if (mIndex == INVALID_INDEX ) force = true ;
801
804
// Detect if last is the same
@@ -1466,8 +1469,6 @@ private void updateTint() {
1466
1469
1467
1470
@ Override
1468
1471
public void onPageScrolled (int position , float positionOffset , final int positionOffsetPixels ) {
1469
- //Fix the wrong position problem for some devices
1470
- position = position + (int ) positionOffset ;
1471
1472
if (mOnPageChangeListener != null )
1472
1473
mOnPageChangeListener .onPageScrolled (position , positionOffset , positionOffsetPixels );
1473
1474
You can’t perform that action at this time.
0 commit comments