- Home
- Forum
- Xamarin.Forms
- TabView jumps to last Tab on Rotation of device
TabView jumps to last Tab on Rotation of device
Hello,
I have following problem:
Our app consists ob an SfTabView with an nested SfTabView. So far, everything works correctly, as we can change Tabs, the content gets updated and so on. But one problem is, that if the user switches from portrait to landscape mode of the tablet, the active nested SfTabView gets set to the last Tab in the Tabscollection. Say, you have 8 Tabs, and are working on the third one, switching the orientation of the device results in begiing in the last tab instantly. Is there a possibility to control this behaviour?
As I have tested, this always occurs, when the size of the SfTabView is invalidated and newly calculated.
Thanks for help
Best regards
Bernhard
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
RS
Ruba Shanmugam
Syncfusion Team
January 15, 2021 10:04 AM UTC
Hi Bernhard,
Greetings from Syncfusion.
We have validated your query with the updated nuget (18.4.0.34) using the nested TabView. We have prepared a sample based on the provided information. Get the sample and video link from below.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/NestedTabView_Tablet-1135347915
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/TabViewVideo_LandscapeChange1716522888
As we have checked with Android Tablet_m-dpi_7in_Oreo (Android 8.1 - API 27).
Since we are not aware of your exact application scenario, so we request you to try our sample and can you please revert us by modifying the sample based on your application along with replication procedure or else providing the issue replication video. Addressing any of these things will more helpful to analyze further and provide an appropriate solution.
Please let us know, if you have any other concerns.
Regards,
Ruba Shanmugam
Greetings from Syncfusion.
We have validated your query with the updated nuget (18.4.0.34) using the nested TabView. We have prepared a sample based on the provided information. Get the sample and video link from below.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/NestedTabView_Tablet-1135347915
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/TabViewVideo_LandscapeChange1716522888
As we have checked with Android Tablet_m-dpi_7in_Oreo (Android 8.1 - API 27).
Since we are not aware of your exact application scenario, so we request you to try our sample and can you please revert us by modifying the sample based on your application along with replication procedure or else providing the issue replication video. Addressing any of these things will more helpful to analyze further and provide an appropriate solution.
Please let us know, if you have any other concerns.
Regards,
Ruba Shanmugam
BE
Bernhard
January 15, 2021 01:00 PM UTC
Hello,
thank you for your response, but in our app, there is it a little bit different.
We create the Nested Tab views dynamically in code, and then the user clicks, lets say on an label in the content ob a tabview. Thereafter a popup is opened, allowing the user to edit the content of the label. After editing the content the popup is closed and the content of the label is updated. This leads to a recalculation of the size of the Tab View, and this leads in the end to the fact, that it tries to jump to the last Tab.
Therefore my question: is there a mechanism which triggers in code behind the switch of the tabs, when the size is invalidated and can this be surpressed?
I have found out in the meantime, that with Version 18.3.x the problem is not appearing, so I will stay on this verison for the moment for this particular component.
Best regards
Bernhard
RS
Ruba Shanmugam
Syncfusion Team
January 18, 2021 11:38 AM UTC
Hi Bernhard,
Thansk for the update.
We have analyzed your query and prepared a sample based on provided information. Still we couldn't able to reproduce the same. Get the sample from below link
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/NestedTabView_Dynamic-2124608397
In this sample we have created a nested tabView dynamically based on the content of entered text in the PopupView. The edited content is updated on content of PopupLayout, based on that value the TabItems are created.
We request you to try our samples and can you please revert us by modifying the sample based on your application scenario along with replication procedure or else providing the issue replication video. It would be more helpful for us to provide a better solution at earliest.
Regards,
Ruba Shanmugam
Thansk for the update.
We have analyzed your query and prepared a sample based on provided information. Still we couldn't able to reproduce the same. Get the sample from below link
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/NestedTabView_Dynamic-2124608397
In this sample we have created a nested tabView dynamically based on the content of entered text in the PopupView. The edited content is updated on content of PopupLayout, based on that value the TabItems are created.
We request you to try our samples and can you please revert us by modifying the sample based on your application scenario along with replication procedure or else providing the issue replication video. It would be more helpful for us to provide a better solution at earliest.
Regards,
Ruba Shanmugam
Marked as answer
BE
Bernhard
January 19, 2021 04:24 PM UTC
Hello,
thanks for your reply. Based on your sample I built a corresponding sample of our structure and there the strange behavior is not appearing, so I will have a deeper look, what is causing the problems, and why. If I can reproduce it in my sample application I will reopen this case and provide you the corresponding example - until then I will further look where my mistake comes from.
Best regards
Bernhard
RS
Ruba Shanmugam
Syncfusion Team
January 21, 2021 04:43 AM UTC
Hi Bernhard,
Thank you for the update and we will wait until hear from you on the next process.
Regards,
Ruba Shanmugam
Thank you for the update and we will wait until hear from you on the next process.
Regards,
Ruba Shanmugam
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
- Marked answer
-
BE Bernhard
- Jan 14, 2021 01:12 PM UTC
- Jan 21, 2021 04:43 AM UTC