App上面有个二维码现在都是比较普遍了,方便很多更能,而二维码控件的实现也非常方便,所以加上二维码马上可以提高档次。而我使用的就是zxing。
zxing的使用:
1.导入bulid.gradle:
compile 'cn.yipianfengye.android:zxing-library:2.1'
2.导入xml文件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_z_xing" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ImageView android:id="@+id/iv" android:layout_width="match_parent" android:layout_height="300dp" /> <LinearLayout android:layout_width="match_parent" android:orientation="horizontal" android:layout_height="wrap_content"> <Button