public class CaptureFragment
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
KEY_RESULT |
| 限定符和类型 | 方法和说明 |
|---|---|
CameraManager |
getCameraManager()
已过时。
|
CaptureHelper |
getCaptureHelper()
Get
CaptureHelper |
int |
getIvTorchId()
获取
ivTorch 的ID |
int |
getLayoutId()
布局id
|
View |
getRootView() |
int |
getSurfaceViewId()
预览界面
surfaceView 的id |
int |
getViewfinderViewId()
ViewfinderView 的 id |
void |
initCaptureHelper() |
void |
initUI()
初始化
|
boolean |
isContentView(int layoutId)
|
static CaptureFragment |
newInstance() |
void |
onActivityCreated(Bundle savedInstanceState) |
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) |
void |
onDestroy() |
void |
onPause() |
boolean |
onResultCallback(java.lang.String result)
接收扫码结果回调
|
void |
onResume() |
void |
setRootView(View rootView) |
public static final java.lang.String KEY_RESULT
public static CaptureFragment newInstance()
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
public void initUI()
public void initCaptureHelper()
public boolean isContentView(@LayoutRes
int layoutId)
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 View getRootView()
public void setRootView(View rootView)
public void onActivityCreated(@Nullable
Bundle savedInstanceState)
public void onResume()
public void onPause()
public void onDestroy()
public boolean onResultCallback(java.lang.String result)
result - 扫码结果