v416
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:color="@android:color/white"/>
|
||||
|
||||
</selector>
|
||||
|
After Width: | Height: | Size: 997 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 276 KiB |
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<shape
|
||||
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
android:shape="oval">
|
||||
|
||||
<!-- 填充的颜色 -->
|
||||
|
||||
<solid android:color="#c1333333" />
|
||||
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
|
||||
<corners android:radius="360dip" />
|
||||
|
||||
<!-- padding: Button 里面的文字与Button边界的间隔 -->
|
||||
|
||||
<padding
|
||||
|
||||
android:left="0dp"
|
||||
|
||||
android:top="0dp"
|
||||
|
||||
android:right="0dp"
|
||||
|
||||
android:bottom="0dp"
|
||||
|
||||
/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#c1333333" />
|
||||
|
||||
<corners android:radius="5dip" />
|
||||
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 二维码识别界面 -->
|
||||
<cn.bertsir.zbar.CameraPreview
|
||||
android:id="@+id/cp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"></cn.bertsir.zbar.CameraPreview>
|
||||
|
||||
|
||||
<cn.bertsir.zbar.view.ScanView
|
||||
android:id="@+id/sv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFEFEFEF"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="bottom"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/mo_scanner_back"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:padding="10dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/top_back" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="扫描二维码"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="50dp"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/tv_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="扫一扫"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_flash"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/circle_trans_black"
|
||||
android:src="@drawable/scanner_light"
|
||||
android:padding="5dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:layout_marginRight="10dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_album"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/circle_trans_black"
|
||||
android:src="@drawable/scanner_album"
|
||||
android:padding="5dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="30dp"
|
||||
>
|
||||
|
||||
<cn.bertsir.zbar.view.VerticalSeekBar
|
||||
android:id="@+id/vsb_zoom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
app:seekBarRotation ="CW270"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_margin="30dp"
|
||||
>
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_loading"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#fff"
|
||||
android:text="请稍后..."
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 扫描动画 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:src="@drawable/shadow"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/shadow"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_scan"
|
||||
android:layout_width="@dimen/scan_frame_width"
|
||||
android:layout_height="@dimen/scan_frame_width"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/capture1"
|
||||
>
|
||||
|
||||
<cn.bertsir.zbar.view.CornerView
|
||||
android:id="@+id/cnv_left_top"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:corner_width="5dp"
|
||||
android:visibility="gone"
|
||||
app:corner_gravity="leftTop"
|
||||
/>
|
||||
|
||||
|
||||
<cn.bertsir.zbar.view.CornerView
|
||||
android:id="@+id/cnv_left_bottom"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:corner_width="5dp"
|
||||
android:visibility="gone"
|
||||
app:corner_gravity="leftBottom"
|
||||
android:layout_gravity="bottom|left"
|
||||
/>
|
||||
|
||||
<cn.bertsir.zbar.view.CornerView
|
||||
android:id="@+id/cnv_right_top"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:corner_width="5dp"
|
||||
android:visibility="gone"
|
||||
app:corner_gravity="rightTop"
|
||||
android:layout_gravity="right|top"
|
||||
/>
|
||||
|
||||
|
||||
<cn.bertsir.zbar.view.CornerView
|
||||
android:id="@+id/cnv_right_bottom"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:corner_width="5dp"
|
||||
android:visibility="gone"
|
||||
app:corner_gravity="rightBottom"
|
||||
android:layout_gravity="right|bottom"
|
||||
/>
|
||||
|
||||
|
||||
<cn.bertsir.zbar.view.ScanLineView
|
||||
android:id="@+id/iv_scan_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/shadow"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/shadow"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="CornerView">
|
||||
<attr name="corner_color" format="color" />
|
||||
<attr name="corner_width" format="dimension" />
|
||||
<attr name="corner_gravity" format="enum">
|
||||
<enum name="leftBottom" value="1" />
|
||||
<enum name="rightBottom" value="3" />
|
||||
<enum name="leftTop" value="0" />
|
||||
<enum name="rightTop" value="2" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
<declare-styleable name="VerticalSeekBar">
|
||||
<attr name="seekBarRotation">
|
||||
<enum name="CW90" value="90" />
|
||||
<enum name="CW270" value="270" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="common_color">#ff5f00</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="scan_frame_width">200dp</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">zBarLibary</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AlertDialogStyle" parent="@android:style/Theme.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
</style>
|
||||
|
||||
<style name="ActivityTranslucent">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:activityOpenEnterAnimation">@null</item>
|
||||
<item name="android:activityOpenExitAnimation">@null</item>
|
||||
<item name="android:activityCloseEnterAnimation">@null</item>
|
||||
<item name="android:activityCloseExitAnimation">@null</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<external-path
|
||||
name="camera_photos"
|
||||
path="." />
|
||||
</paths>
|
||||