{"action":"opened","issue":{"url":"https://api.github.com/repos/RedApparat/Fotoapparat/issues/303","repository_url":"https://api.github.com/repos/RedApparat/Fotoapparat","labels_url":"https://api.github.com/repos/RedApparat/Fotoapparat/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/RedApparat/Fotoapparat/issues/303/comments","events_url":"https://api.github.com/repos/RedApparat/Fotoapparat/issues/303/events","html_url":"https://github.com/RedApparat/Fotoapparat/issues/303","id":365230004,"node_id":"MDU6SXNzdWUzNjUyMzAwMDQ=","number":303,"title":"Custom aspect ratio is not working","user":{"login":"Nominalista","id":9215552,"node_id":"MDQ6VXNlcjkyMTU1NTI=","avatar_url":"https://avatars0.githubusercontent.com/u/9215552?v=4","gravatar_id":"","url":"https://api.github.com/users/Nominalista","html_url":"https://github.com/Nominalista","followers_url":"https://api.github.com/users/Nominalista/followers","following_url":"https://api.github.com/users/Nominalista/following{/other_user}","gists_url":"https://api.github.com/users/Nominalista/gists{/gist_id}","starred_url":"https://api.github.com/users/Nominalista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nominalista/subscriptions","organizations_url":"https://api.github.com/users/Nominalista/orgs","repos_url":"https://api.github.com/users/Nominalista/repos","events_url":"https://api.github.com/users/Nominalista/events{/privacy}","received_events_url":"https://api.github.com/users/Nominalista/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-30T14:40:19Z","updated_at":"2018-09-30T14:40:19Z","closed_at":null,"author_association":"NONE","body":"I wanted to set the aspect ratio for the preview and picture the same as screen aspect ratio.\r\n\r\n```\r\nval displayMetrics = DisplayMetrics()\r\nactivity.windowManager.defaultDisplay.getMetrics(displayMetrics)\r\nval screenAspectRatio = displayMetrics.heightPixels.toFloat() / displayMetrics.widthPixels.toFloat()\r\n\r\nval cameraConfiguration = CameraConfiguration(\r\n        pictureResolution = aspectRatio(screenAspectRation, highestResolution()),\r\n        previewResolution = aspectRatio(screenAspectRation, highestResolution()))\r\n```\r\nUnfortunately as the result I get black screen (despite the fact that `screenAspectRatio` is correct value). 4:3 and 16:9 ratios are working correctly. "}}
{"actor":{"display_login":"Nominalista"}}