public class FieldByFieldUISettings extends UISettings implements HelpIntentUIOptions, OcrResultDisplayUIOptions, DebugImageListenerUIOptions, CurrentImageListenerUIOptions, SuccessfulImageListenerUIOptions, SplashScreenUIOptions
FieldByFieldScanActivity
.Constructor and Description |
---|
FieldByFieldUISettings(FieldByFieldBundle fieldByFieldBundle) |
FieldByFieldUISettings(android.content.Intent intent) |
Modifier and Type | Method and Description |
---|---|
FieldByFieldOverlayController |
createOverlayController(android.app.Activity activity,
ScanResultListener scanResultListener)
Creates overlay controller and configures it using set values.
|
FieldByFieldBundle |
getFieldByFieldBundle()
Returns the
FieldByFieldBundle containing scan elements with parsers that will be used for processing. |
java.lang.Class |
getTargetActivity()
Returns target activity.
|
void |
saveToIntent(android.content.Intent intent)
Saves this scan activity settings to
Intent so it can be passed to the
corresponding scan activity. |
void |
setCurrentImageListener(CurrentImageListener currentImageListener)
Sets implementation of
CurrentImageListener interface that will obtain images that
are currently being processed. |
void |
setDebugImageListener(DebugImageListener debugImageListener)
Sets implementation of
DebugImageListener interface that will obtain images that are
being processed. |
void |
setHelpIntent(android.content.Intent helpIntent)
Defines intent for help activity called when help should be shown.
|
void |
setInfiniteLoopScan(boolean infiniteLoopScan)
If set to
true , scan activity will never return. |
void |
setOcrResultDisplayMode(OcrResultDisplayMode ocrResultDisplayMode)
Defines mode in which OCR result will be drawn on camera preview.
|
void |
setSplashScreenLayoutResourceID(int splashScreenLayoutResourceID)
Defines the ID of the layout resource that will be used as camera splash screen displayed
while camera is being initialized.
|
void |
setSuccessfulImageListener(SuccessfulImageListener successfulImageListener)
Sets implementation of
SuccessfulImageListener interface that will obtain images from the
successful scan. |
getActivityTheme, getFilterTouchesWhenObscured, getUsingFlagSecure, setActivityTheme, setCameraSettings, setFilterTouchesWhenObscured, setUsingFlagSecure
public FieldByFieldUISettings(@NonNull FieldByFieldBundle fieldByFieldBundle)
public FieldByFieldUISettings(@NonNull android.content.Intent intent)
@NonNull public FieldByFieldBundle getFieldByFieldBundle()
FieldByFieldBundle
containing scan elements with parsers that will be used for processing.FieldByFieldBundle
containing scan elements with parsers that will be used for processing.public void setHelpIntent(@Nullable android.content.Intent helpIntent)
HelpIntentUIOptions
setHelpIntent
in interface HelpIntentUIOptions
helpIntent
- intent for help activity called when help should be shown.public final void saveToIntent(@NonNull android.content.Intent intent)
UISettings
Intent
so it can be passed to the
corresponding scan activity. Intent target activity must be set before calling this method,
and target activity must be compatible with this settings.
DO NOT USE THIS METHOD UNLESS YOU KNOW WHAT YOU ARE DOING. Improper usage will crash your app.saveToIntent
in class UISettings
intent
- Intent to which this scan activity settings should be saved.public void setInfiniteLoopScan(boolean infiniteLoopScan)
true
, scan activity will never return. Default is false
.infiniteLoopScan
- whether to activate infinite loop mode or not.public void setOcrResultDisplayMode(@Nullable OcrResultDisplayMode ocrResultDisplayMode)
OcrResultDisplayUIOptions
setOcrResultDisplayMode
in interface OcrResultDisplayUIOptions
ocrResultDisplayMode
- mode in which OCR result will be drawn on camera preview.public void setDebugImageListener(@Nullable DebugImageListener debugImageListener)
DebugImageListenerUIOptions
DebugImageListener
interface that will obtain images that are
being processed. DebugImageListener will receive all possible debug images that become
available during recognition process.setDebugImageListener
in interface DebugImageListenerUIOptions
debugImageListener
- Implementation of debug image listener or null
to clear listener
that has been set previously.public void setCurrentImageListener(@Nullable CurrentImageListener currentImageListener)
CurrentImageListenerUIOptions
CurrentImageListener
interface that will obtain images that
are currently being processed. CurrentImageListener
will receive all possible images
that become available during recognition process.setCurrentImageListener
in interface CurrentImageListenerUIOptions
currentImageListener
- Implementation of image listener or null
to clear listener
that has been set previously.public void setSuccessfulImageListener(@Nullable SuccessfulImageListener successfulImageListener)
SuccessfulImageListenerUIOptions
SuccessfulImageListener
interface that will obtain images from the
successful scan. SuccessfulImageListener
will receive image when recognition process
has successfully scanned an item and has a successful scan image to return.setSuccessfulImageListener
in interface SuccessfulImageListenerUIOptions
successfulImageListener
- Implementation of image listener or null
to clear
listener that has been set previously.public final void setSplashScreenLayoutResourceID(@LayoutRes int splashScreenLayoutResourceID)
SplashScreenUIOptions
setSplashScreenLayoutResourceID
in interface SplashScreenUIOptions
splashScreenLayoutResourceID
- ID of the layout resource that will be used as camera
splash screen displayed while camera is being initialized.@NonNull public java.lang.Class getTargetActivity()
UISettings
ActivityRunner
.
DO NOT USE THIS METHOD UNLESS YOU KNOW WHAT YOU ARE DOING. Improper usage will crash your app.getTargetActivity
in class UISettings
@NonNull public FieldByFieldOverlayController createOverlayController(@NonNull android.app.Activity activity, @NonNull ScanResultListener scanResultListener)
UISettings
createOverlayController
in class UISettings