Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
00563195
D
DoraemonKit
项目概览
DiDi
/
DoraemonKit
大约 1 年 前同步成功
通知
166
Star
19623
Fork
3062
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DoraemonKit
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
00563195
编写于
8月 21, 2019
作者:
W
wanglihang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FIX:Missing recycle() calls
上级
2a0aa448
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
17 addition
and
13 deletion
+17
-13
Android/doraemonkit/src/main/java/com/didichuxing/doraemonkit/zxing/view/ViewfinderView.java
...om/didichuxing/doraemonkit/zxing/view/ViewfinderView.java
+17
-13
未找到文件。
Android/doraemonkit/src/main/java/com/didichuxing/doraemonkit/zxing/view/ViewfinderView.java
浏览文件 @
00563195
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
package
com.didichuxing.doraemonkit.zxing.view
;
package
com.didichuxing.doraemonkit.zxing.view
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.content.res.TypedArray
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
...
@@ -31,14 +34,10 @@ import android.graphics.Shader;
...
@@ -31,14 +34,10 @@ import android.graphics.Shader;
import
android.graphics.SweepGradient
;
import
android.graphics.SweepGradient
;
import
android.util.AttributeSet
;
import
android.util.AttributeSet
;
import
android.view.View
;
import
android.view.View
;
import
com.didichuxing.doraemonkit.R
;
import
com.didichuxing.doraemonkit.R
;
import
com.didichuxing.doraemonkit.zxing.camera.CameraManager
;
import
com.didichuxing.doraemonkit.zxing.camera.CameraManager
;
import
com.google.zxing.ResultPoint
;
import
com.google.zxing.ResultPoint
;
import
java.util.Collection
;
import
java.util.HashSet
;
/**
/**
* This view is overlaid on top of the camera preview. It adds the viewfinder rectangle and partial
* This view is overlaid on top of the camera preview. It adds the viewfinder rectangle and partial
...
@@ -85,6 +84,8 @@ public final class ViewfinderView extends View {
...
@@ -85,6 +84,8 @@ public final class ViewfinderView extends View {
//初始化自定义属性信息
//初始化自定义属性信息
TypedArray
array
=
context
.
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
ViewfinderView
);
TypedArray
array
=
context
.
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
ViewfinderView
);
try
{
laserColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkLaserColor
,
0x00FF00
);
laserColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkLaserColor
,
0x00FF00
);
cornerColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkCornerColor
,
0x00FF00
);
cornerColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkCornerColor
,
0x00FF00
);
frameColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkFrameColor
,
0xFFFFFF
);
frameColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkFrameColor
,
0xFFFFFF
);
...
@@ -94,6 +95,9 @@ public final class ViewfinderView extends View {
...
@@ -94,6 +95,9 @@ public final class ViewfinderView extends View {
labelTextColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkLabelTextColor
,
0x90FFFFFF
);
labelTextColor
=
array
.
getColor
(
R
.
styleable
.
ViewfinderView_dkLabelTextColor
,
0x90FFFFFF
);
labelText
=
array
.
getString
(
R
.
styleable
.
ViewfinderView_dkLabelText
);
labelText
=
array
.
getString
(
R
.
styleable
.
ViewfinderView_dkLabelText
);
labelTextSize
=
array
.
getFloat
(
R
.
styleable
.
ViewfinderView_dkLabelTextSize
,
36
f
);
labelTextSize
=
array
.
getFloat
(
R
.
styleable
.
ViewfinderView_dkLabelTextSize
,
36
f
);
}
finally
{
array
.
recycle
();
}
// Initialize these once for performance rather than calling them every time in onDraw().
// Initialize these once for performance rather than calling them every time in onDraw().
paint
=
new
Paint
();
paint
=
new
Paint
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录