public ViewfinderView(Context context, AttributeSet attrs) {
super(context, attrs);
paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint2 = new Paint(Paint.ANTI_ALIAS_FLAG);
Resources resources = getResources();
maskColor = Color.parseColor("#60000000");//resources.getColor(R.color.viewfinder_mask);
resultColor = Color.parseColor("#b0000000");//resources.getColor(R.color.result_view);
// GradientDrawable、lineDrawable
mRect = new Rect();
int left = Color.RED;//getResources().getColor(R.color.lightgreen);
//getResources().getColor(R.color.green);
//mCenterColor = Color.RED;
setCenterColor(Color.RED);
int right = Color.RED;//getResources().getColor(R.color.lightgreen);
//lineDrawable = resources.getDrawable(R.drawable.zx_code_line);
mDrawable = new GradientDrawable(
GradientDrawable.Orientation.LEFT_RIGHT, new int[]{left,
left, mCenterColor, right, right});
scannerAlpha = 0;
possibleResultPoints = new ArrayList<>(5);
}
ViewfinderView.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:RLibrary
作者:
评论列表
文章目录