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

Screen Orientation Issue: Image Picker #109

Closed
swapneshagrawal-tudip opened this issue Dec 28, 2023 · 4 comments
Closed

Screen Orientation Issue: Image Picker #109

swapneshagrawal-tudip opened this issue Dec 28, 2023 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@swapneshagrawal-tudip
Copy link

I am launching the image picker on the landscape mode of my tab application but as soon as It opens the camera and crops the image it changes to portrait mode. due to which my existing activity gets killed.

Any Suggestion to overcome this issue.

@Drjacky

@Drjacky
Copy link
Owner

Drjacky commented Dec 29, 2023

Haven't tried but you need to have something like

<activity
        android:name="com.yalantis.ucrop.UCropActivity"
        android:screenOrientation="landscape"
        android:configChanges="orientation|screenSize|keyboardHidden" />

in your application, and then use merge manifest: https://developer.android.com/build/manage-manifests

@Drjacky Drjacky self-assigned this Dec 29, 2023
@swapneshagrawal-tudip
Copy link
Author

@Drjacky Heyy I took a clone of the repo and removed the android:screenOrientation="landscape" from Manifest and it worked. But I am using your repo as the dependency in my project. So I am not sure how to change the manifest file then. I tried to fork the repo and use my repo as dependency but it also did not worked.

@Drjacky
Copy link
Owner

Drjacky commented Dec 29, 2023

without forking uCrop or ImagePicker repo; just have that ☝🏼 snippet in your app's AndroidManifest.xml. Then probably it compiles shows a manifest conflict error. So, you need to merge both AndroidManifests (https://developer.android.com/build/manage-manifests#override_uses-sdk_for_imported_libraries)

@swapneshagrawal-tudip
Copy link
Author

@Drjacky Thanks a lot for the solution It Worked.

@Drjacky Drjacky added the help wanted Extra attention is needed label Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants