[英]Display Camera View With Custom UI
Good day android geniuses! 安卓天才好日子! I am creating an application that allows the user to use the their android phone as speedometer.
我正在创建一个应用程序,允许用户将其Android手机用作速度计。 Imagine the phone posted to the top of your windshield.
想象一下,手机贴在挡风玻璃的顶部。 The phone should be using the camera view without any of the stock UI with a speedometer in the right hand corner.
手机应该使用相机视图,而右上角没有速度表,没有任何库存用户界面。 I am currently using intents to display the camera but this displays a camera with all the stock UI.
我目前正在使用意图显示相机,但这将显示具有所有库存UI的相机。 How can i display the camera view with a custom UI overlay?
如何使用自定义UI覆盖显示相机视图?
some quick googling shows this result here http://android-er.blogspot.com/2010/12/add-overlay-on-camera-preview.html This example is older, but its the concept that matters here.. 一些快速的谷歌搜索显示此结果在这里http://android-er.blogspot.com/2010/12/add-overlay-on-camera-preview.html此示例较旧,但其概念在这里很重要。
you cannot start your camera with an intent if you want a custom ui, you have to create the custom ui and initialize the camera all yourself. 如果您想要自定义用户界面,则无法以意图启动相机,您必须创建自定义用户界面并自行初始化相机。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.