Package io.anyline2.view
Class FlashConfig
- java.lang.Object
-
- io.anyline2.view.FlashConfig
-
public class FlashConfig extends java.lang.Object
A class used to configure the Flash
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FlashConfig.FlashAlignment
Enum for all possible flash alignments.static class
FlashConfig.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.FlashAlignment
getAlignment()
int
getImageAutoId()
int
getImageOffId()
int
getImageOnId()
FlashConfig.FlashMode
getMode()
int
getOffsetXInDp()
int
getOffsetYInDp()
int
getPaddingInDp()
void
setAlignment(FlashConfig.FlashAlignment alignment)
Set where the flash should be positioned.void
setImageAutoId(int imageAutoId)
Set the resource id for the AUTO state of the flash view.void
setImageOffId(int imageOffId)
Set the resource id for the OFF state of the flash view.void
setImageOnId(int imageOnId)
Set the resource id for the ON state of the flash view.void
setMode(FlashConfig.FlashMode mode)
Set the flash mode.void
setOffsetXInDp(int offsetXInDp)
set x offset for flash alignmentvoid
setOffsetYInDp(int offsetYInDp)
set y offset for flash alignmentvoid
setPaddingInDp(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
-
-