Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

.NET maui always gives the original orientation even after changing the orientation on android emulator

This is kind of silly but

private void OnButtonClicked(object sender, EventArgs e)
{
    Shell.Current.DisplayAlert("Orientaion", DeviceDisplay.Current.MainDisplayInfo.Orientation.ToString(), "OK");
}

always gives "portrait" (with a phone emulator) or "landscape" (with a tablet emulator) even after I switch the orientation. It just gives the default orientation even after the emulator succesfully changes it.
What am I missing ?
Thank you.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can recheck if you have enabled option Auto-rotate on your android device.

Swipe down on your phone’s screen, then you will find the Auto-rotate option.
enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading