Package io.anyline2.view
Class FlashConfig
- java.lang.Object
-
- io.anyline2.view.FlashConfig
-
public class FlashConfig extends java.lang.ObjectA class used to configure the Flash
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlashConfig.FlashAlignmentEnum for all possible flash alignments.static classFlashConfig.FlashMode
-
Constructor Summary
Constructors Constructor Description FlashConfig()FlashConfig(android.content.Context context, org.json.JSONObject flashJson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlashConfig.FlashAlignmentgetAlignment()intgetImageAutoId()intgetImageOffId()intgetImageOnId()FlashConfig.FlashModegetMode()intgetOffsetXInDp()intgetOffsetYInDp()intgetPaddingInDp()voidsetAlignment(FlashConfig.FlashAlignment alignment)Set where the flash should be positioned.voidsetImageAutoId(int imageAutoId)Set the resource id for the AUTO state of the flash view.voidsetImageOffId(int imageOffId)Set the resource id for the OFF state of the flash view.voidsetImageOnId(int imageOnId)Set the resource id for the ON state of the flash view.voidsetMode(FlashConfig.FlashMode mode)Set the flash mode.voidsetOffsetXInDp(int offsetXInDp)set x offset for flash alignmentvoidsetOffsetYInDp(int offsetYInDp)set y offset for flash alignmentvoidsetPaddingInDp(int paddingInDp)Set the padding of the flash view in dp
-
-
-
Method Detail
-
getMode
public FlashConfig.FlashMode getMode()
-
setMode
public void setMode(FlashConfig.FlashMode mode)
Set the flash mode.- Parameters:
mode- the flash mode.
-
getAlignment
public FlashConfig.FlashAlignment getAlignment()
-
setAlignment
public void setAlignment(FlashConfig.FlashAlignment alignment)
Set where the flash should be positioned. (Ignored if flash mode isio.anyline.camera.AnylineViewConfig.FlashMode#NONE- Parameters:
alignment- the alignment of the flash view
-
getOffsetXInDp
public int getOffsetXInDp()
-
setOffsetXInDp
public void setOffsetXInDp(int offsetXInDp)
set x offset for flash alignment- Parameters:
offsetXInDp- positive values move flash view to right, negative values move it to the left
-
getOffsetYInDp
public int getOffsetYInDp()
-
setOffsetYInDp
public void setOffsetYInDp(int offsetYInDp)
set y offset for flash alignment- Parameters:
offsetYInDp- positive values move flash view closer to the bottom edge, negative values move it in dircetion of the top edge
-
getPaddingInDp
public int getPaddingInDp()
-
setPaddingInDp
public void setPaddingInDp(int paddingInDp)
Set the padding of the flash view in dp- Parameters:
paddingInDp- the padding in dp
-
getImageOnId
public int getImageOnId()
-
setImageOnId
public void setImageOnId(int imageOnId)
Set the resource id for the ON state of the flash view. The size will be used as is.- Parameters:
imageOnId- resource id for the ON state
-
getImageOffId
public int getImageOffId()
-
setImageOffId
public void setImageOffId(int imageOffId)
Set the resource id for the OFF state of the flash view. The size will be used as is.- Parameters:
imageOffId- resource id for the OFF state
-
getImageAutoId
public int getImageAutoId()
-
setImageAutoId
public void setImageAutoId(int imageAutoId)
Set the resource id for the AUTO state of the flash view. The size will be used as is.- Parameters:
imageAutoId- resource id for the AUTO state
-
-