㈠ android使用Zxing扫描二维码改成竖屏后,后面的预览画面出现了拉伸,扭曲的情况,有没有哪位大牛解决了,急求
更改CameraConfigurationManager.java文件
在 Log.d(TAG, "Screen resolution: " + screenResolution);这句之后增加
Point screenResolutionForCamera = new Point();
screenResolutionForCamera.x = screenResolution.x;
screenResolutionForCamera.y = screenResolution.y;
// preview size is always something like 480*320, other 320*480
if (screenResolution.x < screenResolution.y) {
screenResolutionForCamera.x = screenResolution.y;
screenResolutionForCamera.y = screenResolution.x;
}
再更改cameraResolution = getCameraResolution(parameters, screenResolution);为cameraResolution = getCameraResolution(parameters, screenResolutionForCamera);
代码下载地址:http://download.csdn.net/detail/moonql70/5032148
㈡ 请问你门的Android与iphone手机,扫二维码都怎样扫
在苹果手机自带的应用里,包括相机,是没有扫描二维码这个功能的。但是可以采取其他手段如下:
1、QQ、微信、微博这一类软件,它们就有扫描二维码的功能,支持用手机上的相机直接扫描二维码,也支持扫描你保存到手机相册中的二维码。
㈢ 如何使用Android相机扫描二维码
用 qq或者微信自带的扫一扫啊!浏览器在输入地址的地方有个扫描标志点下就可以扫
㈣ Android端的二维码(Zxing)扫描,要如何设定修改扫描框的大小,然后如何设定近距离聚焦
扫描框的大小就是修改CameraManager的四个常量
距离聚焦这个最好就不要去设置了,因为都是自己聚焦的
㈤ 二维码扫描的时候镜头不对,竖屏的时候是横屏,关了自动旋转屏幕也不管用。求救
那是因为二维码扫描软件本身的原因,用芝麻客吧!我查查就是横屏的,是不会转的。
㈥ 如何使用android studio开发扫描二维码程序
我们项目的前提是你已经将基本的运行环境及sdk都已经安装好了,读者可自行网络环境配置相关内容,本文不再赘述。右键点击new-->Mole,Mole相当于新建了一个项目。如图所示
选择Android Application,点击next
将My Mole 和app改成自己项目相应的名字,同时选择支持的Android版本
这一步我们选择Blank Activity,自己手动编写登录界面,而不依赖系统内置的Login Activity,一直点击next,最后点击finish就完成了项目的创建
在project下我们可以看到出现了我们刚才创建的login项目
展开res/layout,点击打开activity_main.xml文件,在这个文件里我们将完成登录界面的编写
这是初始的主界面,还没有经过我们编写的界面,Android Studio有一个很强大的预览功能,相当给力
我们将activity_main.xml的代码替换成如下代码:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical"
android:stretchColumns="0,3">
<TableRow>
<TextView />
<TextView
android:text="账 号:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24px"
/>
<EditText
android:id="@+id/account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24px"
android:minWidth="220px"/>
<TextView />
</TableRow>
<TableRow android:layout_marginTop="20px">
<TextView />
<TextView
android:text="密 码:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:id="@+id/pwd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="220px"
android:textSize="24px"
android:inputType="textPassword"/>
<TextView />
</TableRow>
<TableRow android:layout_marginTop="20px">
<TextView />
<Button
android:id="@+id/login"
android:text="登录"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/quit"
android:text="退出"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView />
</TableRow>
</TableLayout>