You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2021. It is now read-only.
Currently, the CameraPreview is aligned to the bottom.
When a device has an higher aspect ratio than the camera's, a black area will appear at the top, in the remaining space.
This is not that bad. However, MagicEye could handle it better, like Android default camera does.
Reference
My device (Xiaomi Mi 2 Lite) has a aspect ratio of 18:9. This is how Android camera handle aspect ratios:
18:9: When the camera matches the device aspect ratio, the preview is fullscreened.
16:9: When the camera aspect ratio is a little lower, the top control area becomes black, and the bottom remains as in 18:9.
4:3: When the aspect ratio is considerably lower, both top and bottom control areas become black and the preview is in between them.
Issue
The main issue on implementing this is the consideration about control layers. I can make the default camera layer behave well without much effort. However, what if someone would want to provide a custom control layer where all the controls should be at the bottom or top, for instance?
Considering this, it's possible to:
Ignore the issue. This is easier and won't break anything.
Provide a way to control the preview positioning with the control layer API. This takes more time and may result on a more complex API, or even API breakage.
The text was updated successfully, but these errors were encountered:
Currently, the CameraPreview is aligned to the bottom.
When a device has an higher aspect ratio than the camera's, a black area will appear at the top, in the remaining space.
This is not that bad. However, MagicEye could handle it better, like Android default camera does.
Reference
My device (Xiaomi Mi 2 Lite) has a aspect ratio of 18:9. This is how Android camera handle aspect ratios:
18:9: When the camera matches the device aspect ratio, the preview is fullscreened.
16:9: When the camera aspect ratio is a little lower, the top control area becomes black, and the bottom remains as in 18:9.
4:3: When the aspect ratio is considerably lower, both top and bottom control areas become black and the preview is in between them.
Issue
The main issue on implementing this is the consideration about control layers. I can make the default camera layer behave well without much effort. However, what if someone would want to provide a custom control layer where all the controls should be at the bottom or top, for instance?
Considering this, it's possible to:
The text was updated successfully, but these errors were encountered: