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):
![phoneinfo](https://user-images.githubusercontent.com/51514351/59149998-258a0e00-8a1d-11e9-9dbd-34855658cb19.png)
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:
![okpreview](https://user-images.githubusercontent.com/51514351/59150026-697d1300-8a1d-11e9-82d4-5ce148291812.png)
This is the LogCat the first time I open the app:
![firstinstalled](https://user-images.githubusercontent.com/51514351/59150036-8580b480-8a1d-11e9-8e2a-e190a597c1ba.png)
However, if I close the app and open it again, the preview is distorted:
![distortedpreview](https://user-images.githubusercontent.com/51514351/59150047-a943fa80-8a1d-11e9-9c97-add240289805.png)
But the LogCat seems exactly the same:
![closedandopened](https://user-images.githubusercontent.com/51514351/59150058-bb259d80-8a1d-11e9-893e-6360f0d538cd.png)
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:
![backgroundandopened](https://user-images.githubusercontent.com/51514351/59150079-24a5ac00-8a1e-11e9-8745-79902751672f.png)
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:
![capturedimage](https://user-images.githubusercontent.com/51514351/59150128-eb217080-8a1e-11e9-8fbf-77cec679d569.jpg)
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.