简体   繁体   中英

How to draw on top of camera preview?

I want to draw some thing on the view which we get when our camera is on in android mobile.

I do not want to take picture nor record video just that view from camera and then draw some thing on screen.

Drawing on screen will not be and issue but when we turn on camera which view we get and how can we use that view in our application?

You'll want to check androids camera-API .

You can get the preview to display in a SurfaceView or your own View-subclass, which can then be used to draw on. Some more knowledge might be found here .

您可以使用 RelativeLayout 将其他视图与用于相机预览的 SurfaceView 对齐

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