Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Fix for CameraView blacks outs and Aspect ratio iteration issue #125

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

FabinPaul
Copy link
Contributor

@FabinPaul FabinPaul commented Mar 24, 2017

  1. CameraView blacks out when changing size/ calling requestLayout because 2 SurfaceView/TextureView exists within CameraView Framelayout.

  2. It is not safe to traverse and remove from the same set. It will result
    is ConcurrentModificationException or NullpointerException in case
    of ArrayMap. So new Set<AspectRatio> was added to traverse the
    ArrayMap.

Fixed layout issues with the capture FAB in the demo (google#120)
getSupportedAspectRatio returns aspect ratios of preview sizes for which
picture sizes doesn't exist. This results in NullPointerException. So
getSuportedAspectRatio now depends on suported Picture Sizes
Resolves: google#88
TextureView/SurfaceView was added twice to CameraView. So when
requestLayout is called on CameraView blank surface comes up. Note that
CameraView parent is FrameLayout, so last added view comes in front.
In the solution, I have simply removed last added
TextureView/SurfaceView before adding new TextureView/SurfaceView inside
start function on CameraView. This makes sure that new Surface is
created for each start.

Resolves: google#111
It is not safe to traverse and remove from the same set. It will result
is `ConcurrentModificationException` or `NullpointerException` in case
of ArrayMap. So new `Set<AspectRatio>` was added to traverse the
ArrayMap.

Check commit: 6ceaf86
@FabinPaul FabinPaul changed the title Fix for CameraView blacks outs Fix for CameraView blacks outs and Aspect ratio iteration issue Mar 28, 2017
@FabinPaul
Copy link
Contributor Author

@yaraki , @poldz123, fixed issue pointed out in code commit : 6ceaf86.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants