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

Rotate Screen camera zoomed #42

Closed
brian1212 opened this issue Jun 15, 2017 · 10 comments
Closed

Rotate Screen camera zoomed #42

brian1212 opened this issue Jun 15, 2017 · 10 comments
Assignees
Labels

Comments

@brian1212
Copy link

can you check it ,please.When i rotate screen portait to landscape, camera in landscape mode is zoomed,when i rotate back it normal.

@dmitry-zaitsev
Copy link
Member

Could you please provide screenshots?

@brian1212
Copy link
Author

My device set auto rotation.
when i open app in portrait and rotate to landscape.
screenshot_20170616-094442
screenshot_20170616-094452

when i open app in landscape mode and rotate to portrait
screenshot_20170616-094517
screenshot_20170616-094534

@dmitry-zaitsev
Copy link
Member

Thanks for the screenshots - looks odd indeed. Could you please also provide us with the following information:

  • Which device is that? Which OS version?
  • Snippet of code where you initialize Fotoapparat
  • XML layout in which you added CameraView

@dmitry-zaitsev dmitry-zaitsev self-assigned this Jun 16, 2017
@brian1212
Copy link
Author

i just run your demo.i test on nexus 4 rom NitrogenOS 7.1.2 and Samsung s5 rom 6.0.1.

@dmitry-zaitsev
Copy link
Member

@brian1212 May I ask you to do a little debugging for us? Could you please check what values RendererParameters has in TextureRendererView line 101 when you start the app and when you rotate the screen?

@dmitry-zaitsev
Copy link
Member

Alternatively, please try updating to 1.0.3. It will not fix the problem, but it will print more info to log, which would hopefully help us solve the issue.

@namnguyen211
Copy link

when i start camera
Renderer parameters are: RendererParameters{previewSize=Size{width=1280, height=960}, frameRotation=270}
when i rotate right
Renderer parameters are: RendererParameters{previewSize=Size{width=1280, height=960}, frameRotation=180}
when i rotate left
Renderer parameters are: RendererParameters{previewSize=Size{width=1280, height=960}, frameRotation=0}

seem to be when i rotate screen camera start again.right?

@dmitry-zaitsev
Copy link
Member

dmitry-zaitsev commented Jul 7, 2017

Hm, those seem to be correct values. Sorry to ask, but could you please also put a breakpoint at line 136 in TexturerRendererView and check which values previewSize take and which values are passed to this method call:

getChildAt(0).layout(
        -extraX / 2,
        -extraY / 2,
        width - (extraX / 2),
        height - (extraY / 2)
);

@brian1212
Copy link
Author

when i open app:
screen shot 2017-07-10 at 9 08 14 am
when i rotate right
screen shot 2017-07-10 at 9 09 12 am
when i rotate left
screen shot 2017-07-10 at 9 12 15 am

@Diolor
Copy link
Member

Diolor commented Dec 31, 2017

Normally should not happen in v2. Feel free to comment

@Diolor Diolor closed this as completed Dec 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants