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

lock orientation doesn't work #181

Merged
merged 1 commit into from
Oct 16, 2016
Merged

Conversation

campelo
Copy link
Contributor

@campelo campelo commented Jun 22, 2016

this if condiction is inside lockOrientation method (right)
with this change, now the orientation will work when set manually.

this if condiction is inside lockOrientation method (right)
with this change, now the orientation will work when set manually.
@rkistner
Copy link
Member

I haven't been able to reproduce this issue yet (although the change doesn't seem to do damage either). Can you reproduce this in the sample app? If not, do you have some sample code to reproduce the issue?

@campelo
Copy link
Contributor Author

campelo commented Jul 16, 2016

Hi @rkistner. For the issue is very simple. Call the public void initializeFromIntent(Intent intent, Bundle savedInstanceState) with a not null Bundle savedInstanceState. Set this bundle with an another orientation to lock. I want the screen is landscape during all time then this condition "if (orientationLock == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)" is always false and never call the lockOrientation(); inside.
This if "if (orientationLock == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)" already exists in the lockOrientation() method! This condition is correct inside lockOrientation but was wrong out there. :)

@rkistner rkistner merged commit 2373c88 into journeyapps:master Oct 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants