You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2021. It is now read-only.
This is most probably related to the Activity lifecycle. The entire view is being destroyed and re-created when the device is rotated. And, we do not save/restore state within the view.
The text was updated successfully, but these errors were encountered:
So I found an interesting work around. I'm using native messaging center to force the portrait landscape thing and this bug would keep occurring no matter where I called it from (primarily using OnAppearing()).
However the UI would fix itself after an action, such as moving to a tabbed view. I was able to get around the UI landscape/portrait bugout by calling the forceLandscape or forcePortrait from my viewmodel before popping/pushing the new page.
Example below: MessagingCenter.Send((Views.SignaturePage)Navigation.NavigationStack[Navigation.NavigationStack.Count - 1], "forcePortrait");
For this to work you need to get ahold of the current page casted to the correct type. (I exploited the fact that I am passing the navigation to my VM).
This was originally mentioned here: https://forums.xamarin.com/discussion/68380/signature-in-signature-pad-getting-misplaced-while-changing-screen-orientation
This is most probably related to the
Activity
lifecycle. The entire view is being destroyed and re-created when the device is rotated. And, we do not save/restore state within the view.The text was updated successfully, but these errors were encountered: