google / cameraview

[DEPRECATED] Easily integrate Camera features into your Android app
Apache License 2.0
4.74k stars 1.03k forks source link

Set / Get Aspect Ratio #151

Open cybercitizen7 opened 7 years ago

cybercitizen7 commented 7 years ago

Hey guys,

Not sure if it is an issue, but if I set Aspect Ratio explicitly in code to, e.g. 9:16 for supporting portrait mode and then call getAspectRatio() the output will be still 16:9.

cameraView.setAspectRatio(AspectRatio.parse("9:16"));
cameraView.getAspectRatio();  // Output: "16:9"

So again not sure if it is functionality issue, or just the getter is wrongly returning.

sibelius commented 6 years ago

check this https://github.com/google/cameraview/pull/218