FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(android-bottom-tabs): transition type on programmatic selectedInd… · NativeScript/NativeScript@e9dfa20 · GitHub

Commit e9dfa20

Browse files
authored andcommitted
fix(android-bottom-tabs): transition type on programmatic selectedIndex change (#6942)
1 parent 27c1281 commit e9dfa20

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tns-core-modules/ui/tab-view/tab-view.android.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,13 @@ export class TabView extends TabViewBase {
643643
}
644644

645645
[selectedIndexProperty.setNative](value: number) {
646+
const smoothScroll = this.androidTabsPosition === "top";
647+
646648
if (traceEnabled()) {
647-
traceWrite("TabView this._viewPager.setCurrentItem(" + value + ", true);", traceCategory);
649+
traceWrite("TabView this._viewPager.setCurrentItem(" + value + ", " + smoothScroll + ");", traceCategory);
648650
}
649651

650-
this._viewPager.setCurrentItem(value, true);
652+
this._viewPager.setCurrentItem(value, smoothScroll);
651653
}
652654

653655
[itemsProperty.getDefault](): TabViewItem[] {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL