maui icon indicating copy to clipboard operation
maui copied to clipboard

[Android] RotateYTo - wrong perspective rendering in Android

Open bcaceiro opened this issue 1 year ago • 9 comments

Description

When using the method RotateYTo, to a visual element, in this case, a Frame, in iOS it is rendered correctly, however, in Android, the perspective is screwed up, giving a aweful experience.

See video repro:

https://github.com/dotnet/maui/assets/2139254/24ee900c-b510-4fb0-ad11-119c060b173b

Steps to Reproduce

Add a Frame to a Page

<Frame BackgroundColor="#2596BE"
                       HeightRequest="70"
                       WidthRequest="165"
                       Padding="0"
                       x:Name="doorFrame1"
                       CornerRadius="0"
                       Margin="5,0,5,0"
                       BorderColor="Transparent"
                       VerticalOptions="Center"
                       HorizontalOptions="Center">

And, in code-behind, animate the RotateYTo:

public async void DoMagicClicked(object sender, EventArgs args)
{
     doorFrame1.AnchorX =  1;
     await doorFrame1.RotateYTo(75, 700, Easing.BounceOut);            
}

Link to public reproduction project repository

No response

Version with bug

8.0.6

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android API 30+

Did you find any workaround?

Not really, I found this link https://theconfuzedsourcecode.wordpress.com/2017/12/19/ze-flippable-view-in-xamarin-forms-with-native-animations/ where the author talks about the Camera Perspective, however I am not sure how to use this with current maui architecture.

Relevant log output

No error messages, just the wrong renderization in Android

bcaceiro avatar Jan 21 '24 16:01 bcaceiro

@jsuarezruiz I will tag you, since you have the AlohaKit Package, and animations, and perhaps you may know how to fix / workaround this issue?

bcaceiro avatar Jan 21 '24 16:01 bcaceiro

Hi @bcaceiro. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Jan 22 '24 15:01 ghost

@bcaceiro if you use border instead of frame do you get the same issue?

PureWeen avatar Jan 22 '24 15:01 PureWeen

Hi @PureWeen , yes. I have tried with the following VisualElements:

  • Frame
  • Border
  • Boxview

bcaceiro avatar Jan 22 '24 15:01 bcaceiro

Do I need to upload a repro project for you to follow? Since I have the relevant code pasted? or it isn't necessary?

bcaceiro avatar Jan 22 '24 15:01 bcaceiro

Any news on this subject?

bcaceiro avatar Jan 30 '24 05:01 bcaceiro

Up

bcaceiro avatar Mar 07 '24 20:03 bcaceiro

Verified this issue with Visual Studio 17.10 Preview 7.0 (8.0.21&8.0.6). Can repro on android platform with above code. 20044

Zhanglirong-Winnie avatar May 11 '24 09:05 Zhanglirong-Winnie

The issue still remains in latest release. It prevents to do animations using RotateY since as noticed the visual effect is not the desired

bcaceiro avatar May 11 '24 09:05 bcaceiro