Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How do you properly rotate the view when the screen orientation changes in React Native?

I'm trying to display two different tables. One in landscape mode, and one in portrait mode. The tables change appropriately but the view doesn't rotate.

When I try to use different combinations of transform: rotate and manually setting the height/width it produces less than desirable results.

The bottom drawer navigator is also staying in the original spot on the bottom of the phone. This makes me think that I'm going about this wrong.

Any help or a point in the right direction would be much appreciated as my Google Fu is currently failing me.

question from:https://stackoverflow.com/questions/65649937/react-native-how-to-rotate-view-properly-on-orientation-change

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
340 views
Welcome To Ask or Share your Answers For Others

1 Answer

I had the view locked to portrait in app.json. When I got rid of that one line of code it worked as expected.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...