简体   繁体   English

如何在Android上将相机方向锁定为纵向

[英]How to set camera orientation locked to portrait on android

I'm building a scanner app using this scan library , how do I set the orientation in the library code to set the camera orientation locked to portrait?我正在使用此扫描库构建扫描仪应用程序,如何在库代码中设置方向以将相机方向锁定为纵向? I've tried Lock Camera orientation to portrait and setting camera orientation to portrait not working我试过将相机方向锁定为纵向并将相机方向设置为纵向不起作用

Don't use third party libs不要使用第三方库

https://developer.android.com/guide/topics/media/camera https://developer.android.com/guide/topics/media/camera

You can use the official android docs to learn how to use and then apply what you got from the other links.您可以使用官方 android 文档来学习如何使用,然后应用您从其他链接中获得的内容。 If you want to edit and crop you cand find more information in those links:如果您想编辑和裁剪,您可以在这些链接中找到更多信息:

How to crop and rotate image programmatically in android? 如何在android中以编程方式裁剪和旋转图像?

Android: Edit image intent Android:编辑图像意图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM