Giter Site home page Giter Site logo

Comments (3)

wcoder avatar wcoder commented on June 18, 2024

@Bracefor, thanks for your report!

I published a new version of the plugin:
https://www.nuget.org/packages/Plugin.DeviceOrientation/1.0.7

For the fix, look at this section:
https://github.com/wcoder/Xamarin.Plugin.DeviceOrientation#xamarinforms-android

Could you please check this version, and tell me about your results?

from xamarin.plugin.deviceorientation.

Huaba93 avatar Huaba93 commented on June 18, 2024

@wcoder

This bug still exists. On some Android tablets CrossDeviceOrientation.Current.CurrentOrientation is reversed. I guess this is because some tablets are in landscape mode by default. We could reproduce this with

  • Sony Xperia Tablet Z2 (android 5.1.1)
  • Google pixel c (android 8.1.0)
  • Google Nexus 10 (android 5.1.1)

I suspect there are many more devices with this problem.
we could't reproduce it with emulators.

from xamarin.plugin.deviceorientation.

Huaba93 avatar Huaba93 commented on June 18, 2024

@wcoder I could also reproduce on a Samsung Galaxy Tab 4

activity.Resources.Configuration.Orientation returns Landscape

activity.WindowManager.DefaultDisplay.Rotation returns Rotation180 and is converted by your plugin to DeviceOrientations.PortraitFlipped but this is wrong

activity.WindowManager.DefaultDisplay is deprecated since API Level 11, this should really be replaced with a more recent solution

from xamarin.plugin.deviceorientation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.