Comments (3)
@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.
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.
@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)
- LockOrientation not working on tablet HOT 3
- Is there any way to prevent the orientation change? HOT 8
- App crashes when I lock orientation to PortraitFlipped HOT 10
- How can I set to default the orientation of the App to Landscape? HOT 2
- Orientation lock does not work on iOS HOT 4
- Comparing orientations? HOT 4
- Support for NETSTANDARD 2.0 HOT 1
- Please add Fullscreen plist value requirement to documentation
- iOS NuGet still references .net standard 1.6
- Getting a NullReferenceException HOT 5
- Android: Cannot access a disposed object. HOT 3
- ios: after unlock, orientation doesn't restore normal value. HOT 1
- CurrentOrientation is reversed on some Android tablets
- Where is v2.0
- Add SetCurrentActivityResolver + Remove dependency to Plugin.CurrentActivity
- Build warning: Using a deprecated debug information level.
- Check/port to support MAUI HOT 3
- Possible to use lib for changing orientation iOS HOT 1
- NullReferenceException on Android HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamarin.plugin.deviceorientation.