Hey Mitch! First of all, thanks for the course and all the code you've done, it's helping me a lot with an university project.
I'm having some problems to get a well proportioned preview before capturing the image.
Here's my phone test (Huawei P8 Lite, ALE-L21):
Well, the thing is, when I first install the app and open it, the preview is well proportioned as you can see in this screenshot:
This is the LogCat the first time I open the app:
However, if I close the app and open it again, the preview is distorted:
But the LogCat seems exactly the same:
And the most strange thing is, if now I exit the app (but leaving it in the background, not closing it definitely) and enter again, the preview is OK! And the LogCat I obtain is this:
Also, this distortion has nothing to do with the captured image, which is always well proportioned despite the preview is OK or not. This is how the image looks like:
I really don't know where the problem is, but obviously it has something to do with whether I close the app or leave it at the background (although the fact that it works well when I first install it is driving me crazy). In both cases, I think the program takes the same resolutions because of the log messages I obtain, so I don't know which is the difference.
Thanks in advance, it is very important for me to solve it.