SimpleMobileTools / Simple-Camera

Quick photo and video camera with a flash, customizable aspect ratio.
https://www.simplemobiletools.com
GNU General Public License v3.0
753 stars 287 forks source link

CameraX: Fix capture/preview resolution #342

Closed KryptKode closed 1 year ago

KryptKode commented 1 year ago

Changes

tibbi commented 1 year ago

it behaves way too bad with a notch and the flashlight/resolution pickers dont work like in OnePlus camera at all yet camera

tibbi commented 1 year ago
  1. I dont like that orange background behind the current flash mode and resolution, lets just color the icons orange as they are now
  2. lets make the Fullscreen icon taller as it is currently a square, use the square for 1:1, just like at OnePlus camera. If you cannot redraw them, Ill do that later.
  3. lets add some fade animations at toggling flashlight or aspect ratio, like in OnePlus camera too. When the available options are shown and hiding.
  4. in the app settings if both Purchase Thank You and Use English are hidden, hide the General section label too. Currently I see the General label without having anything in it.

Notch handling and photo/video capturing itself seems to work just fine though, good job on that. Ill do more testing later with other devices etc too.

tibbi commented 1 year ago

did some more tests, it seems to work well with zooming and clicking for changing focus too. We could maybe change the main Capture button to a basic circle and have some click effect there like at OnePlus Camera. The latest Simple Gallery build from github seems to rotate photos captured with the front camera by 90 degrees if deep zoomable images are enabled, maybe you could take a look at it. If deep zooming is disabled, it works well.

tibbi commented 1 year ago

when I was testing the app, toggling front/rear camera, going into the gallery etc and opening other camera apps too, I started getting "An error occurred while obtaining the camera" or so when launching Simple Camera, while opening other camera apps worked. I had to force close Simple Camera to fix it. I cannot reproduce it though, just saying that it can happen.

tibbi commented 1 year ago

top and bottom margins seem to be not set properly after first run, when the permissions are just being granted. Afterwards it works well already. I mean that those top 3 icons are behind the notch and the bottom buttons are behind the navigation bar.

tibbi commented 1 year ago

if I start recording a video and switch to Photo mode without stopping the recording, I get an error that "video recording failed, try using a different resolution". But the actual recorded video is saved properly.

tibbi commented 1 year ago

if I click on the aspect ratio picker and select the currently selected ratio, lets not reload anything to avoid glitches, just close the aspect ratio picker

tibbi commented 1 year ago

I found these 3 on my Android 12, but it will likely happen everywhere.

tibbi commented 1 year ago

the core seems to work well, I reported mostly some UI glitches and improvements. Once you fix the things listed here, Ill merge the PR and Ill create individual tasks for whatever I find so that it is maintainable.

KryptKode commented 1 year ago

I will look into them. Thanks

tibbi commented 1 year ago

you can also update the target and compile SDK version to 33, we wont need 31 anymore

KryptKode commented 1 year ago

Hello @tibbi . Please review. I fixed the issues you highlighted except these ones

  1. fix toggling front/rear camera, going into the gallery etc and opening other camera apps shows error
  2. fix margins after fresh install

I couldn't reproduce them

tibbi commented 1 year ago

nice, just a couple details.

  1. the top items arent properly aligned in my case at opening. Like if you click on the aspect ratio picker and the new options appear, they are positioned a bit lower than the original bar.
  2. there is some small left to right animation of the middle 4:3 aspect ratio at extending, when the available aspect ratios show up. I guess it is centered dynamically? Lets place it in the middle instantly. Note that I have 16:9 hidden, guess that is the fullscreen aspect ratio
  3. I can never exit the app with the Back button, it is blocked by something. Not even after a fresh launch.
tibbi commented 1 year ago

actually Ill accent the PR as it is getting ridiculously big, will go through the code and tweak some things here and there once you are done with it.

KryptKode commented 1 year ago
  1. there is some small left to right animation of the middle 4:3 aspect ratio at extending, when the available aspect ratios show up. I guess it is centered dynamically? Lets place it in the middle instantly. Note that I have 16:9 hidden, guess that is the fullscreen aspect ratio

Yes, it's hidden because the full screen mode is a 16:9