Hassan Raza
Hassan Raza

Reputation: 679

React Native Scroll View Device Orientation Landscape

I am working on React Native and I am implementing the ScrollView in that facing some issue like when my device is portrait it good and scrolling is fine. Like below.

enter image description here

But when I move the orientation to Landscape it remains in the same position. Like below

enter image description here

I want this should be adjusted according to the screen Orientation

Upvotes: 1

Views: 1838

Answers (2)

Vincent Menant
Vincent Menant

Reputation: 475

Have you the following line in your Android manifest ? androidmanifest.xml

Because, the android:screenOrientation="portrait" lock device orientation for your main activity.

You can find your AndroidManifest.xml in your android/app/src/main folder

And like avani-kothari says, check if you don't use react-native-Orientation library

Upvotes: 1

Siraj Ahmad
Siraj Ahmad

Reputation: 476

Please make sure that you have marked the auto-rotation settings as ON(Enable).

you can refer this Link for how to enable auto-rotation in android

enter image description here

Upvotes: 1

Related Questions