Package io.anyline2.view
Class FlashConfig
-
- All Implemented Interfaces:
public class FlashConfig
A class used to configure the Flash
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
FlashConfig.FlashMode
public enum
FlashConfig.FlashAlignment
Enum for all possible flash alignments.
-
Field Summary
Fields Modifier and Type Field Description public FlashConfig.FlashMode
mode
public FlashConfig.FlashAlignment
alignment
public int
offsetXInDp
public int
offsetYInDp
public int
paddingInDp
public int
imageOnId
public int
imageOffId
public int
imageAutoId
-
Constructor Summary
Constructors Constructor Description FlashConfig()
FlashConfig(Context context, JSONObject flashJson)
-
Method Summary
Modifier and Type Method Description FlashConfig.FlashMode
getMode()
void
setMode(FlashConfig.FlashMode mode)
Set the flash mode. FlashConfig.FlashAlignment
getAlignment()
void
setAlignment(FlashConfig.FlashAlignment alignment)
Set where the flash should be positioned. int
getOffsetXInDp()
void
setOffsetXInDp(int offsetXInDp)
set x offset for flash alignment int
getOffsetYInDp()
void
setOffsetYInDp(int offsetYInDp)
set y offset for flash alignment int
getPaddingInDp()
void
setPaddingInDp(int paddingInDp)
Set the padding of the flash view in dp int
getImageOnId()
void
setImageOnId(int imageOnId)
Set the resource id for the ON state of the flash view. int
getImageOffId()
void
setImageOffId(int imageOffId)
Set the resource id for the OFF state of the flash view. int
getImageAutoId()
void
setImageAutoId(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
-
-
-
-