Lock orientation but still detect orientation changes

Viewed 34

I have locked orientation on small devices using layout like so:

const layout = {orientation: ['portrait']}

However, I'd still like to detect attempts at orientation change. The typical way to detect changes in RN is Dimensions.addEventListener('change', handleOrientationChange). Since this is locked, though, dimensions change event never happens. Is there some other way to detect attempts at changing orientation from RN when locked?

0 Answers
Related