public class DocumentScannerFragment extends BaseFragment implements android.view.View.OnTouchListener, DocumentTracker.DocumentDetectionListener
isBusy, mCallback| Constructor and Description |
|---|
DocumentScannerFragment() |
| Modifier and Type | Method and Description |
|---|---|
static DocumentScannerFragment |
instantiate(boolean isPassport) |
static DocumentScannerFragment |
instantiate(boolean isPassport,
int docBorderColorRes,
int docBodyColorRes,
int torchColor,
int torchColorLight) |
protected void |
onAfterViewCreated() |
void |
onAttach(android.content.Context context) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy()
Releases the resources associated with the camera source, the associated detectors, and the
rest of the processing pipeline.
|
void |
onDocumentDetected(Document document) |
void |
onInflate(android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState) |
protected void |
onOpenCVConnected() |
protected void |
onOpenCVConnectionFailed() |
void |
onPause()
Stops the camera.
|
void |
onResume()
Restarts the camera.
|
boolean |
onTouch(android.view.View v,
android.view.MotionEvent event)
Called when a touch event is dispatched to a view.
|
loadOpenCV, onSaved, onSaveFailed, onSaveTaskStarted, onViewCreated, saveCroppedImagepublic static DocumentScannerFragment instantiate(boolean isPassport)
public static DocumentScannerFragment instantiate(boolean isPassport, int docBorderColorRes, int docBodyColorRes, int torchColor, int torchColorLight)
public void onInflate(android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState)
public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
protected void onAfterViewCreated()
onAfterViewCreated in class BaseFragmentpublic void onAttach(android.content.Context context)
onAttach in class BaseFragmentprotected void onOpenCVConnected()
onOpenCVConnected in class BaseFragmentprotected void onOpenCVConnectionFailed()
onOpenCVConnectionFailed in class BaseFragmentpublic void onResume()
public void onPause()
public void onDestroy()
public void onDocumentDetected(Document document)
onDocumentDetected in interface DocumentTracker.DocumentDetectionListenerpublic boolean onTouch(android.view.View v,
android.view.MotionEvent event)
onTouch in interface android.view.View.OnTouchListenerv - The view the touch event has been dispatched to.event - The MotionEvent object containing full information about
the event.