How to programmatically control Preview size of Android camera app

Tomoaki Imai
5 min readFeb 20, 2020

It’s been a while since I posted an article about how we take a photo using Camera2 API. Today I’m going to share the way to control the screen size of the preview.

First, let me go through the necessary steps to configure the preview screen. Then I will explain two camera app examples — the first one is a full-screen preview and the other one with…

--

--

Tomoaki Imai

CTO at Noxx https://www.noxx.net/ AI hiring tool. FullStack developer and leader. Love to share ideas about software development. https://github.com/tomoima525