Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android-bottom-tabs): transition type on programmatic selectedIndex change #6942

Conversation

ycherniavskyi
Copy link
Contributor

@ycherniavskyi ycherniavskyi commented Feb 20, 2019

What is the current behavior?

Currently on programmatically change selectedIndex property always applied smoothly scroll to the new item (smoothScroll = true), even for TabView with bottom tabs position. Which lead to unnecessary tabs layout render, because if TabView has for example 3 tabs, and from tab3 you programmatically move to tab1 then tab2 also render.

What is the new behavior?

For TabView with bottom tabs position use immediately transition (smoothScroll = false) on programmatically change selectedIndex property.
It makes perfect sense with already disable the swipe navigation and the items preloading functionality.

Difference visualisation (with animated gif)

  • smoothScroll = true
    smoothscroll-true
  • smoothScroll = false
    smoothscroll-false

@ghost ghost added the ♥ community PR label Feb 20, 2019
@ns-bot
Copy link

ns-bot commented Feb 20, 2019

Please sign CLA at http://www.nativescript.org/cla

@ns-bot ns-bot added the cla: no label Feb 20, 2019
@ns-bot
Copy link

ns-bot commented Feb 20, 2019

CLA signature found, happy contributing!

@ns-bot ns-bot added cla: yes and removed cla: no labels Feb 20, 2019
@ycherniavskyi
Copy link
Contributor Author

Unfortunately, it is not clear for me how to implement tests which will test different transition scheme for top and bottom androidTabsPosition property.

@ghost ghost assigned manoldonev Feb 22, 2019
@ghost ghost added in progress and removed ♥ community PR labels Feb 22, 2019
@manoldonev
Copy link
Contributor

test

@manoldonev manoldonev removed their assignment Feb 22, 2019
@manoldonev manoldonev changed the title Adapt transition type on selectedIndex set in TabView for Android fix(android-bottom-tabs): transition type on programmatic selectedIndex change Feb 22, 2019
@manoldonev manoldonev merged commit e9dfa20 into NativeScript:master Feb 22, 2019
@ghost ghost removed the in progress label Feb 22, 2019
@lock
Copy link

lock bot commented Mar 10, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants