LatestVersion
camera mask library and demo
Scan QRCode to download demo application below:
- 1.1、Gradle
compile 'jsc.kit.cameramask:camera-mask:_latestVersion'
- 1.2、Maven
<dependency>
<groupId>jsc.kit.cameramask</groupId>
<artifactId>camera-mask</artifactId>
<version>_latestVersion</version>
<type>pom</type>
</dependency>
- 2.1、CameraLensView
名称 | 类型 | 描述 |
---|---|---|
clvCameraLensSizeRatio |
float | 相机镜头(或扫描框)大小占View宽度的百分比 |
clvCameraLensTopMargin |
dimension | 相机镜头(或扫描框)与顶部的间距 |
clvCameraLensShape |
enum(square 、circular ) |
相机镜头(或扫描框)形状 |
clvCameraLens |
reference | 相机镜头图片资源 |
clvMaskColor |
color | 相机镜头遮罩颜色 |
clvBoxBorderColor |
color | 扫描框边的颜色 |
clvBoxBorderWidth |
dimension | 扫描框边的粗细 |
clvBoxAngleColor |
color | 扫描框四个角的颜色 |
clvBoxAngleBorderWidth |
dimension | 扫描框四个角边的粗细 |
clvBoxAngleLength |
dimension | 扫描框四个角边的长度 |
clvText |
string | 提示文字 |
clvTextColor |
color | 提示文字颜色 |
clvTextSize |
dimension | 提示文字字体大小 |
clvTextMathParent |
boolean | 提示文字是否填充View的宽度。true与View等宽,false与相机镜头(或扫描框)等宽。 |
clvTextLocation |
enum(belowCameraLens 、aboveCameraLens ) |
提示文字位于相机镜头(或扫描框)上方(或下方) |
clvTextVerticalMargin |
dimension | 提示文字与相机镜头(或扫描框)的间距 |
clvTextLeftMargin |
dimension | 提示文字与View(或相机镜头或扫描框)的左间距 |
clvTextRightMargin |
dimension | 提示文字与View(或相机镜头或扫描框)的右间距 |
- 2.2、ScannerBarView
名称 | 类型 | 描述 |
---|---|---|
sbvSrc |
reference | 扫描条图片 |
子View | 类型 | 属性 |
---|---|---|
cameraLensView |
CameraLensView | CameraLensView所有属性 |
scannerBarView |
ScannerBarView | ScannerBarView所有属性 |
组件 | 使用示例 |
---|---|
ScannerBarView | ScannerBarViewFragment |
CameraLensView | CameraLensViewFragment |
CameraScannerMaskView | CameraScannerMaskViewFragment |
- 4.1、ScannerBarView
- 4.2、CameraLensView
Copyright 2018 JustinRoom
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.