相机 API 存储在 ImageView 中
Camera API store in ImageView
我想使用 Android 的相机 API 在 ImageView 中显示图像。我看到了在 SurfaceView 中显示实时摄像头源的其他可用解决方案,但我想将其存储为图像并将其显示在 ImageView 上,我将在单击按钮时手动更新它。我该怎么做?
I saw the other available solutions which displays the live camera feed in a SurfaceView
这就是所谓的预览,它对人们能够分辨相机指向什么很有用。或者,引用 the documentation:
For users to effectively take pictures or video, they must be able to see what the device camera sees.
I want to store it as an image and display it on an ImageView, which I will manually update on the click of a Button
这称为 "taking a picture" 或“capturing pictures”。使用原始相机 API,要拍照,请在 Camera
对象上调用 takePicture()
。
Android 开发人员文档 a training section 关于创建自定义相机应用程序,以及我上面链接的文档。
我想使用 Android 的相机 API 在 ImageView 中显示图像。我看到了在 SurfaceView 中显示实时摄像头源的其他可用解决方案,但我想将其存储为图像并将其显示在 ImageView 上,我将在单击按钮时手动更新它。我该怎么做?
I saw the other available solutions which displays the live camera feed in a SurfaceView
这就是所谓的预览,它对人们能够分辨相机指向什么很有用。或者,引用 the documentation:
For users to effectively take pictures or video, they must be able to see what the device camera sees.
I want to store it as an image and display it on an ImageView, which I will manually update on the click of a Button
这称为 "taking a picture" 或“capturing pictures”。使用原始相机 API,要拍照,请在 Camera
对象上调用 takePicture()
。
Android 开发人员文档 a training section 关于创建自定义相机应用程序,以及我上面链接的文档。