mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
fix(android-bottom-tabs): transition type on programmatic selectedIndex change (#6942)
This commit is contained in:

committed by
Manol Donev

parent
27c12812f1
commit
e9dfa207d8
@ -643,11 +643,13 @@ export class TabView extends TabViewBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[selectedIndexProperty.setNative](value: number) {
|
[selectedIndexProperty.setNative](value: number) {
|
||||||
|
const smoothScroll = this.androidTabsPosition === "top";
|
||||||
|
|
||||||
if (traceEnabled()) {
|
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[] {
|
[itemsProperty.getDefault](): TabViewItem[] {
|
||||||
|
Reference in New Issue
Block a user