File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
bottom-bar/src/main/java/com/roughike/bottombar Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -432,6 +432,10 @@ public void selectTabAtPosition(int position) {
432432 * @param animate should the tab change be animated or not.
433433 */
434434 public void selectTabAtPosition (int position , boolean animate ) {
435+ selectTabAtPosition (position , animate , true );
436+ }
437+
438+ public void selectTabAtPosition (int position , boolean animate , boolean triggerListeners ) {
435439 if (position > getTabCount () - 1 || position < 0 ) {
436440 throw new IndexOutOfBoundsException ("Can't select tab at position " +
437441 position + ". This BottomBar has no items at that position." );
@@ -443,7 +447,11 @@ public void selectTabAtPosition(int position, boolean animate) {
443447 oldTab .deselect (animate );
444448 newTab .select (animate );
445449
446- updateSelectedTab (position );
450+ if (triggerListeners )
451+ updateSelectedTab (position );
452+ else
453+ currentTabPosition = newPosition ;
454+
447455 shiftingMagic (oldTab , newTab , animate );
448456 handleBackgroundColorChange (newTab , animate );
449457 }
You can’t perform that action at this time.
0 commit comments