-
Notifications
You must be signed in to change notification settings - Fork 466
[Bug] iOS: Tabview Item does not update width when switching orientation between portrait and landscape #1294
Comments
I am also experiencing this same issue on the latest version of Xamarin Forms and Toolkit. The only way it works without redeploying is by navigating away and back to the ContentPage with the TabView in the wanted orientation. |
How to fix it? |
I'm experiencing this issue exactly. @jfversluis I'm wondering if there is a workaround for this 👍🏻 . I'm using XCT version 1.3.0 Thanks in advance. |
Is anyone looking into this or would it be better to look for a different tabview? |
A quick investigation points to it likely being the underlying |
Thanks for looking into the problem |
Hi |
Any update on this or workaround? |
@darrenlattin I wasn't able to find a workaround. The toolkit is awesome, but for tabs I found Sharpnado.Tabs library to be quite impressive. |
no worries. i'll have to fix the orientation for now to portrait. Cheers |
Are there any chances this problem will be corrected in near future ? |
I would say it's unlikely this is going to get fixed any time soon. Sadly the underlying control appears to be causing these issues so without a big bit of work it won't be fixed. Of course if someone from the community wanted to take a look that would certainly help 😃 |
However, somebody said that the issue is not the tabview but the carouselview control from Xamarin.Forms. Maybe it is already fixed on the service pack 9. @jfversluis I am wondering if you have heard about a fix for the carousel view resizing when changing from portrait to landscape. 😀 |
@bijington @vhugogarcia @jfversluis
|
@algostax I certainly don't have the bandwidth to look at this issue right now. Would you be able to look at whether CarouselView really is the cause and whether there might be a solution? |
Is there any update on this problem? We've just come across this, and am looking at needing to implement a completely different tool otherwise, or find a way to fix a single page orientation. |
@dpuckett I personally decided to use Sharpnado.Tabs for my application instead of the toolkit's tabs. There are a bunch of different tab styling options built into Sharpnado and they don't have any problems with orientation changes like the toolkit's do. They take a little bit more work to setup, but a lot more customizable. If you haven't checked them out yet, I'd highly recommend giving them a shot. |
@AustinAHunter you beat me to that recommendation 😃 yes sadly we are in an unknown area of getting this issue resolved. There is a lot of time and effort being spent get other things completed. @dpuckett Sharpnado is a great top ion. That being said if you are happy with limiting to a single orientation that is also a workaround. Of course this might not be ideal though. |
More than 2 years later, the bug is still there and the ticket still opened... |
You can solve the TabbedPage problem by overriding TabbedPage's OnSizeAllocated as follows.
Use this component instead of Xamarin's TabbedPage. For the Carousel on iOS, you can override the ios CarouselViewRenderer as follows (I found this code on xamarin/Xamarin.Forms#8902 (comment)).
It works for me. |
Description
In iOS (iPhone and iPad), tabview contents does not update their width, height, and position when orientation is switched between portrait and landscape.
Steps to Reproduce
Expected Behavior
Tabview items should automatically update their layout to match the device orientation changes.
Actual Behavior
Tabview items does not update their layout to match the device orientation changes.
Basic Information
Workaround
NA
Reproduction imagery
Reproduce Link:
https://github.com/jamesmontemagno/app-peloton/blob/main/src/FitnessApp/Views/ClassesPage.xaml
The text was updated successfully, but these errors were encountered: