简体   繁体   中英

Android camera embedded in a frame

I want to take a picture with my app, but I want to run the camera inside a fragment in a frame. Is it possible to accomplish that? Any help appreciated..

可以使用SurfaceView编写自己的相机模块,请参阅Android文档,以构建相机应用程序示例

If you want to add a frame to the picture taken, you must post-process the captured image, whatever method you choose - be it via intent, or Camera.takePicture().

If you want the preview to appear inside a rectangular frame, you simply create an xml layout to your liking, frame included, and a surfaceView positioned where you need it.

If your frame has some curls or curves on the inside, your preview surface should be z-ordered under this frame (which will include transparent areas).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM