React-native-orientation: Detect device rotation even Orientation.lock is set?

Created on 5 Oct 2017  路  10Comments  路  Source: yamill/react-native-orientation

Hi,
I have the use case, that I want to rotate a picture in a modal floating over my normal view, however not the component beneath the modal.

Is there a way to detect rotations of the device even I set before Orientation.lockToPortrait();?
Thanks!

Most helpful comment

If you want you can use our fork that includes theses changes.

All 10 comments

@KevKo1990 : were you able to achieve the above mentioned use case?
I want to try that in Android and it's working in iOS.

@stoneman1 the @ronit-kadwane commit solves this problem, I can do a PR with that commit if you think it's ok. I've tested it on android.

This would be useful to have. Sometimes you don't want to use the built in orientation events.

@khrizt do you plan on doing the PR?

@johnyoonh yep, here it is PR#280

Hello, I have the same use case, how can I use this PR?

If you want you can use our fork that includes theses changes.

@khrizt yes, already done, works like a charm, thank you very much :)

@khrizt it helped me a lot , thanks man

Implemented @khrizt sensor based orientation to iOS as well.
You can use my my fork.

Was this page helpful?
0 / 5 - 0 ratings