Class FlashConfig


  • public class FlashConfig
    extends java.lang.Object
    A class used to configure the Flash
    • Constructor Detail

      • FlashConfig

        public FlashConfig()
      • FlashConfig

        public FlashConfig​(@NonNull
                           android.content.Context context,
                           @Nullable
                           org.json.JSONObject flashJson)
    • Method Detail

      • setMode

        public void setMode​(FlashConfig.FlashMode mode)
        Set the flash mode.
        Parameters:
        mode - the flash mode.
      • setAlignment

        public void setAlignment​(FlashConfig.FlashAlignment alignment)
        Set where the flash should be positioned. (Ignored if flash mode is io.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