Package | com.distriqt.extension.scanner |
Class | public class ActivityOptions |
Inheritance | ActivityOptions Object |
Property | Defined By | ||
---|---|---|---|
cancelLabel : String = Cancel
The label to place on the cancel button. | ActivityOptions | ||
colour : int = 0x4863A0
The colour code for the background of the interface elements
| ActivityOptions | ||
heading : String
A heading label to display at the top of the scanner interface. | ActivityOptions | ||
message : String
A message string to display at the top of the scanner interface,
below the heading. | ActivityOptions | ||
overlay : BitmapData = null
This overlay is placed over the top of the camera image directly
in the center of the screen. | ActivityOptions | ||
overlayAutoScale : Boolean = false
This controls how the overlay image data is scaled. | ActivityOptions | ||
singleResult : Boolean = false
If this option is true then the scanner will automatically stop and
close the interface when a code is successfully scanned. | ActivityOptions | ||
textColour : int = 0xFFFFFF
The colour code for the text elements
| ActivityOptions |
Method | Defined By | ||
---|---|---|---|
Constructor
| ActivityOptions | ||
setBackgroundColour(colour:int):ActivityOptions
Set the background colour for the ui
| ActivityOptions | ||
setCancelLabel(label:String):ActivityOptions
Set the cancel button label
| ActivityOptions | ||
setHeading(heading:String):ActivityOptions
Set the heading text
| ActivityOptions | ||
setMessage(message:String):ActivityOptions
Set the message text
| ActivityOptions | ||
setOverlay(overlay:BitmapData, autoScale:Boolean = false):ActivityOptions
Set an overlay for the camera preview
| ActivityOptions | ||
setSingleResult(singleResult:Boolean = true):ActivityOptions
Set the single result option
| ActivityOptions | ||
setTextColour(colour:int):ActivityOptions
Set the text colour
| ActivityOptions |
cancelLabel | property |
public var cancelLabel:String = Cancel
The label to place on the cancel button. If this string is empty ie "" then the cancel button is removed.
colour | property |
public var colour:int = 0x4863A0
The colour code for the background of the interface elements
heading | property |
public var heading:String
A heading label to display at the top of the scanner interface.
message | property |
public var message:String
A message string to display at the top of the scanner interface, below the heading.
overlay | property |
public var overlay:BitmapData = null
This overlay is placed over the top of the camera image directly in the center of the screen.
Supported:
overlayAutoScale | property |
public var overlayAutoScale:Boolean = false
This controls how the overlay image data is scaled. This is mainly for retina screens where you may want to take advantage of iOS points (rather than pixels).
When this is true an image that is 320x480 or 320x568 on the iPhone5 will fill the entire screen on all iOS devices whether the screen is 320x480 or a retina 640x960. This means that you can provide one image for both retina and non-retina screens. This works really well with pixel perfect images but otherwise we suggest you provide different images for resolutions by disabling this option.
When this is false the image will be displayed at the actual pixel dimensions. You may wish to provide different images for higher resolution screens.
Supported:
singleResult | property |
public var singleResult:Boolean = false
If this option is true then the scanner will automatically stop and close the interface when a code is successfully scanned.
If false, the interface will remain open until the user clicks the
cancel option or the code calls stopScan
.
Note: This may return more than one code if true. The scanner processes an entire image or frame at a time so if multiple codes are detected in the one frame this will result in several detected codes. The extension doesn't attempt to place importance on these and simply returns all of them and then closes the scanner.
See also
textColour | property |
public var textColour:int = 0xFFFFFF
The colour code for the text elements
ActivityOptions | () | Constructor |
public function ActivityOptions()
Constructor
setBackgroundColour | () | method |
public function setBackgroundColour(colour:int):ActivityOptions
Set the background colour for the ui
Parameters
colour:int — The colour
|
ActivityOptions — ActivityOptions instance for chaining calls
|
See also
setCancelLabel | () | method |
public function setCancelLabel(label:String):ActivityOptions
Set the cancel button label
Parameters
label:String — The button label
|
ActivityOptions — ActivityOptions instance for chaining calls
|
See also
setHeading | () | method |
public function setHeading(heading:String):ActivityOptions
Set the heading text
Parameters
heading:String — The heading
|
ActivityOptions — ActivityOptions instance for chaining calls
|
See also
setMessage | () | method |
public function setMessage(message:String):ActivityOptions
Set the message text
Parameters
message:String — The message
|
ActivityOptions — ActivityOptions instance for chaining calls
|
See also
setOverlay | () | method |
public function setOverlay(overlay:BitmapData, autoScale:Boolean = false):ActivityOptions
Set an overlay for the camera preview
Parameters
overlay:BitmapData — The bitmap data to use for the camera overlay
| |
autoScale:Boolean (default = false ) — Whether the overlay should be auto scaled with the native ui
|
ActivityOptions — ActivityOptions instance for chaining calls
|
See also
setSingleResult | () | method |
public function setSingleResult(singleResult:Boolean = true):ActivityOptions
Set the single result option
Parameters
singleResult:Boolean (default = true ) — If true the activity will close after one scan result
|
ActivityOptions — ActivityOptions instance for chaining calls
|
See also
setTextColour | () | method |
public function setTextColour(colour:int):ActivityOptions
Set the text colour
Parameters
colour:int — The colour
|
ActivityOptions — ActivityOptions instance for chaining calls
|
See also