当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Is there a way to make the size of a surface view which is being used to show a camera feed smaller than full screen?

问题描述:

I'm creating an Android application which adds frames to images (Think those things at the beach that you stick your head in...), but I want the image to show on top of the surface view holding the camera feed so that the user can position the subject of the photo.

The problem I'm having is that the camera feed (the surface view) is showing either side of the image. I want to re-size the surface view to fit the image. The size of the image may vary.

网友答案:

I think you like to have some overlay on top of surface view - this is achieved with frame layout like this:

http://javaocr.svn.sourceforge.net/viewvc/javaocr/trunk/demos/sampler/res/layout/main.xml?revision=229&view=markup

You can place everything but other surface view in the overlay

分享给朋友:
您可能感兴趣的文章:
随机阅读: