From e9dfa207d844c2ffacb8aea0c74abe07109cf2ce Mon Sep 17 00:00:00 2001 From: Yurii Cherniavskyi Date: Fri, 22 Feb 2019 12:37:44 +0200 Subject: [PATCH] fix(android-bottom-tabs): transition type on programmatic selectedIndex change (#6942) --- tns-core-modules/ui/tab-view/tab-view.android.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/tab-view/tab-view.android.ts b/tns-core-modules/ui/tab-view/tab-view.android.ts index fb214f74e..f4cf6b789 100644 --- a/tns-core-modules/ui/tab-view/tab-view.android.ts +++ b/tns-core-modules/ui/tab-view/tab-view.android.ts @@ -643,11 +643,13 @@ export class TabView extends TabViewBase { } [selectedIndexProperty.setNative](value: number) { + const smoothScroll = this.androidTabsPosition === "top"; + if (traceEnabled()) { - traceWrite("TabView this._viewPager.setCurrentItem(" + value + ", true);", traceCategory); + traceWrite("TabView this._viewPager.setCurrentItem(" + value + ", " + smoothScroll + ");", traceCategory); } - this._viewPager.setCurrentItem(value, true); + this._viewPager.setCurrentItem(value, smoothScroll); } [itemsProperty.getDefault](): TabViewItem[] {