Package io.anyline2.view
Class FlashConfig
-
- All Implemented Interfaces:
public class FlashConfigA class used to configure the Flash
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumFlashConfig.FlashModepublic enumFlashConfig.FlashAlignmentEnum for all possible flash alignments.
-
Field Summary
Fields Modifier and Type Field Description public FlashConfig.FlashModemodepublic FlashConfig.FlashAlignmentalignmentpublic intoffsetXInDppublic intoffsetYInDppublic intpaddingInDppublic intimageOnIdpublic intimageOffIdpublic intimageAutoId
-
Constructor Summary
Constructors Constructor Description FlashConfig()FlashConfig(Context context, JSONObject flashJson)
-
Method Summary
Modifier and Type Method Description FlashConfig.FlashModegetMode()voidsetMode(FlashConfig.FlashMode mode)Set the flash mode. FlashConfig.FlashAlignmentgetAlignment()voidsetAlignment(FlashConfig.FlashAlignment alignment)Set where the flash should be positioned. intgetOffsetXInDp()voidsetOffsetXInDp(int offsetXInDp)set x offset for flash alignment intgetOffsetYInDp()voidsetOffsetYInDp(int offsetYInDp)set y offset for flash alignment intgetPaddingInDp()voidsetPaddingInDp(int paddingInDp)Set the padding of the flash view in dp intgetImageOnId()voidsetImageOnId(int imageOnId)Set the resource id for the ON state of the flash view. intgetImageOffId()voidsetImageOffId(int imageOffId)Set the resource id for the OFF state of the flash view. intgetImageAutoId()voidsetImageAutoId(int imageAutoId)Set the resource id for the AUTO state of the flash view. -
-
Constructor Detail
-
FlashConfig
FlashConfig()
-
FlashConfig
FlashConfig(Context context, JSONObject flashJson)
-
-
Method Detail
-
getMode
FlashConfig.FlashMode getMode()
-
setMode
void setMode(FlashConfig.FlashMode mode)
Set the flash mode.
- Parameters:
mode- the flash mode.
-
getAlignment
FlashConfig.FlashAlignment getAlignment()
-
setAlignment
void setAlignment(FlashConfig.FlashAlignment alignment)
Set where the flash should be positioned.
- Parameters:
alignment- the alignment of the flash view
-
getOffsetXInDp
int getOffsetXInDp()
-
setOffsetXInDp
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
int getOffsetYInDp()
-
setOffsetYInDp
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
int getPaddingInDp()
-
setPaddingInDp
void setPaddingInDp(int paddingInDp)
Set the padding of the flash view in dp
- Parameters:
paddingInDp- the padding in dp
-
getImageOnId
int getImageOnId()
-
setImageOnId
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
int getImageOffId()
-
setImageOffId
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
int getImageAutoId()
-
setImageAutoId
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
-
-
-
-