Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proplem dont lock orientation #167

Open
misaku opened this issue Feb 10, 2021 · 2 comments
Open

proplem dont lock orientation #167

misaku opened this issue Feb 10, 2021 · 2 comments

Comments

@misaku
Copy link

misaku commented Feb 10, 2021

i have one problem only in device, when i locked landscap the application change to landscap but comeback to portrait and dont lock. if i try in emulator is ok.
i used android device. any idea?

@452MJ
Copy link

452MJ commented Jun 5, 2023

Same here

@452MJ
Copy link

452MJ commented Jun 6, 2023

I found an solution to solve this problem.
Try to modify function lockToPortrait() in java/org/wonday/orientation/OrientationModule.java

    @ReactMethod
    public void lockToPortrait() {
        //...
-        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);
+        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
        //...
        
    }

452MJ added a commit to 452MJ/react-native-orientation-locker that referenced this issue Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants