iPhone X support with XF 1.5

OdyseeOdysee Member ✭✭

Hello

I have been tasked to change a app for iOS+Android so that will support the latest versions of resp. OS.
But I have stumbled on the "Safe Area" in iOS. Because I'm stuck in Xamarin.Forms 1.5 I can't use the nifty
UseSafeArea = true.

I would VERY much appreciate some direction (whatsoever) to solve the problem.
Have tried everything from padding in xaml to shrinking in code but to no avail.

Yours "Hopeful" T.

Posts

  • JohnHJohnH GBMember ✭✭✭✭✭

    @Odysee said:
    Hello

    I have been tasked to change a app for iOS+Android so that will support the latest versions of resp. OS.
    But I have stumbled on the "Safe Area" in iOS. Because I'm stuck in Xamarin.Forms 1.5 I can't use the nifty
    UseSafeArea = true.

    I would VERY much appreciate some direction (whatsoever) to solve the problem.
    Have tried everything from padding in xaml to shrinking in code but to no avail.

    Yours "Hopeful" T.

    I can think of a few ways, but it would be much safer in the long run to identify the reasons why you cant update and resolve those. Being tied to an older version of a dependency is a really bad situation. In my opinion you should have a remediation project running right now, just for that purpose.

  • OdyseeOdysee Member ✭✭

    @JohnHair said:

    @Odysee said:
    Hello

    I have been tasked to change a app for iOS+Android so that will support the latest versions of resp. OS.
    But I have stumbled on the "Safe Area" in iOS. Because I'm stuck in Xamarin.Forms 1.5 I can't use the nifty
    UseSafeArea = true.

    I would VERY much appreciate some direction (whatsoever) to solve the problem.
    Have tried everything from padding in xaml to shrinking in code but to no avail.

    Yours "Hopeful" T.

    I can think of a few ways, but it would be much safer in the long run to identify the reasons why you cant update and resolve those. Being tied to an older version of a dependency is a really bad situation. In my opinion you should have a remediation project running right now, just for that purpose.

    First Thx for the reply!

    I have already have identified the reason: my customer. They don't want to invest in a newer problem.
    The migration from 1.5 to latest have already been tested, twice, (by other developer) but the problem is the handling
    of ListView. It have changed drastically over this period.

    So you see no immediate solution to the problem?

    Yours "SorryForTheEnglish(NotNative)" T.

  • JohnHJohnH GBMember ✭✭✭✭✭

    @Odysee said:

    @JohnHair said:

    @Odysee said:
    Hello

    I have been tasked to change a app for iOS+Android so that will support the latest versions of resp. OS.
    But I have stumbled on the "Safe Area" in iOS. Because I'm stuck in Xamarin.Forms 1.5 I can't use the nifty
    UseSafeArea = true.

    I would VERY much appreciate some direction (whatsoever) to solve the problem.
    Have tried everything from padding in xaml to shrinking in code but to no avail.

    Yours "Hopeful" T.

    I can think of a few ways, but it would be much safer in the long run to identify the reasons why you cant update and resolve those. Being tied to an older version of a dependency is a really bad situation. In my opinion you should have a remediation project running right now, just for that purpose.

    First Thx for the reply!

    I have already have identified the reason: my customer. They don't want to invest in a newer problem.
    The migration from 1.5 to latest have already been tested, twice, (by other developer) but the problem is the handling
    of ListView. It have changed drastically over this period.

    So you see no immediate solution to the problem?

    Yours "SorryForTheEnglish(NotNative)" T.

    Fair enough, but your customer is accumulating technical debt by not updating. Patching code to support new devices rather than updating the software is technical debt, it is code that needs to be patched to work with the newer devices, tested, then thrown away when the update does occur, and tested again to make sure it all still works.

    You could either detect the screen size or the hardware, compare it to a hard coded list that you create to work out if it is a device that has a safe area, then apply appropriate padding to all your containing stack layouts/grids if required, then test it on newer and older devices to ensure it fixes it for newer, and doesn't break it for older. This approach is expensive and error prone.

    I would just update. :wink:

  • OdyseeOdysee Member ✭✭

    @JohnHair

    Yeah - Stubborn customer...

    I solved by using the combination os systemversion and if SafeAreaInsets where set to something more than 0.
    Then I created the page in code.

    Still a pity that I can't get a grip of the existing <ListView.ItemTemplate> so I could change the padding.

    Still Thx for your reply.

    Yours T.

Sign In or Register to comment.