[英]Zxing android library qr code scan change to landscape mode
I am working on qrcode scanner app, its working fine in phone but when i test this app in tablet, scan qr code return in landscape mode and i have change my xml and java file with portrait mode.我正在开发二维码扫描器应用程序,它在手机上运行良好,但是当我在平板电脑上测试这个应用程序时,在横向模式下扫描二维码返回,我用纵向模式更改了我的 xml 和 java 文件。
here is my code:这是我的代码:
qrScan_visitor = new IntentIntegrator(this);
qrScan_visitor.setCameraId(1);
qrScan.setOrientationLocked(false);
qrScan.initiateScan();
where xml code:其中 xml 代码:
<activity
android:windowSoftInputMode="stateAlwaysHidden"
android:name=".MobileVerify"
android:screenOrientation="portrait"
tools:replace="screenOrientation" />
Any ideas on how to get this to work, this is my activity change in landscape like this关于如何让它发挥作用的任何想法,这是我在这样的景观中的活动变化
?
?
Thanks!谢谢!
I was having same issue in android phone, after adding this in AndroidManifest file my problem resolved我在 android 手机中遇到了同样的问题,在 AndroidManifest 文件中添加后我的问题解决了
<activity
android:name="com.journeyapps.barcodescanner.CaptureActivity"
android:screenOrientation="portrait"
tools:replace="screenOrientation" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.