public class CaptureActivity
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
KEY_RESULT |
| 限定符和类型 | 方法和说明 |
|---|---|
CameraManager |
getCameraManager()
已过时。
|
CaptureHelper |
getCaptureHelper()
Get
CaptureHelper |
int |
getIvTorchId()
获取
ivTorch 的ID |
int |
getLayoutId()
布局id
|
int |
getSurfaceViewId()
预览界面
surfaceView 的ID |
int |
getViewfinderViewId()
viewfinderView 的 ID |
void |
initCaptureHelper() |
void |
initUI()
初始化
|
boolean |
isContentView(int layoutId)
返回true时会自动初始化
#setContentView(int),返回为false是需自己去初始化#setContentView(int) |
protected void |
onCreate(Bundle savedInstanceState) |
void |
onDestroy() |
void |
onPause() |
boolean |
onResultCallback(java.lang.String result)
接收扫码结果回调
|
void |
onResume() |
boolean |
onTouchEvent(MotionEvent event) |
public static final java.lang.String KEY_RESULT
protected void onCreate(@Nullable
Bundle savedInstanceState)
public void initUI()
public void initCaptureHelper()
public boolean isContentView(@LayoutRes
int layoutId)
#setContentView(int),返回为false是需自己去初始化#setContentView(int)layoutId - public int getLayoutId()
public int getViewfinderViewId()
viewfinderView 的 IDR.id.viewfinderView, 如果不需要扫码框可以返回0public int getSurfaceViewId()
surfaceView 的IDpublic int getIvTorchId()
ivTorch 的IDR.id.ivTorch, 如果不需要手电筒按钮可以返回0public CaptureHelper getCaptureHelper()
CaptureHelpermCaptureHelper@Deprecated public CameraManager getCameraManager()
CameraManager use #getCaptureHelper()#getCameraManager()#mCaptureHelper#getCameraManager()public void onResume()
public void onPause()
public void onDestroy()
public boolean onTouchEvent(MotionEvent event)
public boolean onResultCallback(java.lang.String result)
result - 扫码结果