SurfaceView vs TextureView for Camera?

OferM picture OferM · Dec 1, 2014 · Viewed 9.5k times · Source

I want to incorporate a camera feature in my app, that will allow layout transitions of the view itself, changing its size, its preview size, and handle orientation changes efficiently. Should I use TextureView or SurfaceView?

Decisions decisions..

Answer

Sachini Samarasinghe picture Sachini Samarasinghe · Feb 20, 2015

According to your context I suggest TextureView because things like transformations, animations and scaling is not possible with the SurfaceView. But keep in mind TextureView will consume more memory than SurfaceView.