问题
Possible Duplicate:
Overlay images onto Camera preview SurfaceView
Hi I want to create a custom camera preview widget and display current time on preview. how to add text on preview and Record Video. Please give me some idea?
回答1:
This question has already been answered. Refer this thread:
Overlay images onto Camera preview SurfaceView
Here's a blog post with sample code:
http://android-er.blogspot.in/2010/12/add-overlay-on-camera-preview.html
回答2:
You could add your SurfaceView ( the one showing the Video) in a RelativeLayout. A RelativeLayout allows you to place the Views in relation to each other. For example you can define that View A is always above View and on the right side of the parent. Since this layout allows you place Views in relation to each other you can also place Views on top of each other. So you can place a SurfaceView in this Layout which fills the whole RelativeLayout and then place a TextView also in this Layout which always in the parents top left. The TextView will then overlay the SurfaceView since it has no relation to the SurfaceView.
来源:https://stackoverflow.com/questions/13879403/how-to-add-text-on-camera-preview