简体   繁体   English

使用自定义UI显示摄像机视图

[英]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.

相关问题 在相机预览上显示透明视图? - Display a transparent view over a camera preview? Android自定义表面视图在相机表面视图上绘制 - Android custom surface view drawing on camera surface view 如何在相机 2 api 片段中捕获和预览显示到图像视图? - How to capture and preview display to image view in camera 2 api fragment? 如何在自定义视图上显示单独的控制台? - How to display separate console on a custom view? Swagger UI 不显示来自自定义注释界面的响应模型 - Swagger UI does not display response models from custom annotation interface 如何在Java中的Swagger UI中显示枚举的自定义值? - How to display custom value for enum in Swagger UI in Java? 自定义相机应用旋转到前视图,但不返回到后视图 - Custom camera app rotates to front view, but doesn't go back to back view Android UI:自定义GIF视图在RelativeLayout中的位置 - Android UI: Positioning of custom GIF View within RelativeLayout 在图像视图中显示从相机拍摄的图像并将其添加到数据库-Android Studio - Display taken image from camera in image view and add it to database - Android Studio 从相机拍摄的图像无法在图像视图android 5.0中显示,但在android 4.4中工作 - Image taken from camera cannot display in image view android 5.0, but working in android 4.4
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM