public class PESDKConfig extends Settings<ly.img.android.sdk.models.state.PESDKConfig.Event> implements android.os.Parcelable
Settings.RevertibleField, Settings.SaveState
StateObservable.StateUnbindedException
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<PESDKConfig> |
CREATOR |
isRevertible, revertibleFields, STATE_REVERTED
isConfigObject
Modifier | Constructor and Description |
---|---|
|
PESDKConfig() |
protected |
PESDKConfig(android.os.Parcel in) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
DataSourceArrayList<AspectConfigInterface> |
getAspects() |
BlendModeConfig |
getBlendModeById(java.lang.String identifier) |
DataSourceArrayList<BlendModeConfig> |
getBlendModes() |
DataSourceArrayList<ColorConfigInterface> |
getBrushColors() |
OrientationSensor.SCREEN_ROTATION_MODE |
getCameraScreenRotationMode() |
DataSourceArrayList<AspectConfigInterface> |
getCropConfig()
Deprecated.
|
OrientationSensor.SCREEN_ROTATION_MODE |
getEditorScreenRotationMode() |
ImageFilterInterface |
getFilterById(java.lang.String identifier) |
DataSourceArrayList<ImageFilterInterface> |
getFilterConfig() |
FontConfigInterface |
getFontById(java.lang.String identifier) |
DataSourceArrayList<FontConfigInterface> |
getFontConfig() |
CropAspectConfig |
getForceLandscapeCrop() |
CropAspectConfig |
getForcePortraitCrop() |
FrameConfigInterface |
getFrameById(java.lang.String identifier) |
DataSourceArrayList<FrameConfigInterface> |
getFrameConfig() |
OverlayConfigInterface |
getOverlayById(java.lang.String identifier) |
DataSourceArrayList<OverlayConfig> |
getOverlays() |
StickerConfigInterface |
getStickerById(java.lang.String identifier) |
DataSourceArrayList<ColorConfigInterface> |
getStickerColorConfig() |
DataSourceArrayList<StickerListConfigInterface> |
getStickerConfig() |
DataSourceArrayList<ColorConfigInterface> |
getTextBackgroundColorConfig() |
DataSourceArrayList<ColorConfigInterface> |
getTextColorConfig() |
DataSourceArrayList<ToolConfigInterface> |
getTools() |
boolean |
hasChanges() |
boolean |
hasNonDefaults() |
boolean |
isForceCropCaptureEnabled() |
PESDKConfig |
setAspects(java.util.ArrayList<AspectConfigInterface> aspects)
Set Aspect Config
ArrayList<AbstractConfig.AspectConfigInterface> cropConfig = new ArrayListArrayList<>();
cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1));
cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3f));
config.setAspects(cropConfig);
|
PESDKConfig |
setAspects(AspectConfigInterface... aspects)
Set Aspect Config
config.setAspects(
new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1),
new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3f)
);
|
PESDKConfig |
setBrushColors(java.util.ArrayList<ColorConfigInterface> colors)
Set brush colors @see #getTextColorConfig()
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>();
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00));
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000));
config.setBrushColors(colors);
|
PESDKConfig |
setBrushColors(ColorConfigInterface... brushColors)
Set brush colors @see #getTextColorConfig()
config.setBrushColors(
new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00),
new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)
);
|
PESDKConfig |
setCameraScreenRotationMode(OrientationSensor.SCREEN_ROTATION_MODE mode)
Set screen rotation mode in camera mode.
|
PESDKConfig |
setEditorScreenRotationMode(OrientationSensor.SCREEN_ROTATION_MODE mode)
Set screen rotation mode in editor mode.
|
PESDKConfig |
setFilters(java.util.ArrayList<ImageFilterInterface> filter)
Set filter set
ArrayList<AbstractConfig.ImageFilterInterface> filter = new ArrayListArrayList<>()
filter.add(new NoneImageFilter());
filter.add(new ColorFilterAD1920());
filter.add(new ColorFilterAncient());
filter.add(new ColorFilterBleached());
filter.add(new ColorFilterBleachedBlue());
filter.add(new ColorFilterBlues());
filter.add(new ColorFilterBlueShadows());
filter.add(new ColorFilterBreeze());
filter.add(new ColorFilterBW());
filter.add(new ColorFilterCelsius());
filter.add(new ColorFilterClassic());
filter.add(new ColorFilterColorful());
filter.add(new ColorFilterCool());
filter.add(new ColorFilterCottonCandy());
filter.add(new ColorFilterCreamy());
filter.add(new ColorFilterEighties());
filter.add(new ColorFilterElder());
filter.add(new ColorFilterEvening());
filter.add(new ColorFilterFall());
filter.add(new ColorFilterFixie());
filter.add(new ColorFilterFood());
filter.add(new ColorFilterFridge());
filter.add(new ColorFilterFront());
filter.add(new ColorFilterGlam());
filter.add(new ColorFilterHighCarb());
filter.add(new ColorFilterHighContrast());
filter.add(new ColorFilterK1());
filter.add(new ColorFilterK2());
filter.add(new ColorFilterK6());
filter.add(new ColorFilterKDynamic());
filter.add(new ColorFilterKeen());
filter.add(new ColorFilterLenin());
filter.add(new ColorFilterLitho());
filter.add(new ColorFilterLomo());
filter.add(new ColorFilterLomo100());
filter.add(new ColorFilterLucid());
filter.add(new ColorFilterMellow());
filter.add(new ColorFilterNeat());
filter.add(new ColorFilterNoGreen());
filter.add(new ColorFilterOrchid());
filter.add(new ColorFilterPale());
filter.add(new ColorFilterPola669());
filter.add(new ColorFilterPolaSx());
filter.add(new ColorFilterPro400());
filter.add(new ColorFilterQuozi());
filter.add(new ColorFilterSepiahigh());
filter.add(new ColorFilterSettled());
filter.add(new ColorFilterSeventies());
filter.add(new ColorFilterSin());
filter.add(new ColorFilterSoft());
filter.add(new ColorFilterSteel());
filter.add(new ColorFilterSummer());
filter.add(new ColorFilterSunset());
filter.add(new ColorFilterTender());
filter.add(new ColorFilterTexas());
filter.add(new ColorFilterTwilight());
filter.add(new ColorFilterWinter());
filter.add(new ColorFilterX400());
config.setFilters(filter)
|
PESDKConfig |
setFilters(ImageFilterInterface... filter)
Set filter set
config.setFilters(
new NoneImageFilter(),
new ColorFilterAD1920(),
new ColorFilterX400()
)
|
PESDKConfig |
setFonts(java.util.ArrayList<FontConfigInterface> fonts)
Set font set
ArrayList<AbstractConfig.FontConfigInterface> fonts = new ArrayListArrayList<>();
fonts.add(new FontConfig("Geared Slab", fontAssetsFolder + "GearedSlab.ttf"));
config.setFonts(fonts);
|
PESDKConfig |
setFonts(FontConfigInterface... fonts) |
PESDKConfig |
setForcedCropMode(boolean forceCropCapture,
CropAspectConfig portraitCrop,
CropAspectConfig landscapeCrop) |
PESDKConfig |
setFrames(java.util.ArrayList<FrameConfigInterface> frame)
Set frames
ArrayList<AbstractConfig.AspectConfigInterface> cropConfig = new ArrayListArrayList<>();
CropAspectConfig crop4_3 = new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3f);
CropAspectConfig crop16_9 = new CropAspectConfig(R.string.imgly_crop_name_16_9, R.drawable.imgly_icon_crop_16_9, 16/9f);
config.setAspects(
new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1),
crop4_3,
crop16_9
);
config.setFrames(
new FrameConfig(
R.string.imgly_frame_name_wood,
R.drawable.imgly_frame_preview_wood,
R.drawable.imgly_frame_wood_4_3,
crop4_3,
1 // Group-ID to identify an equal frame with a different aspects
),
new FrameConfig(
R.string.imgly_frame_name_wood,
R.drawable.imgly_frame_preview_wood,
R.drawable.imgly_frame_wood_16_9,
crop16_9,
1 // Group-ID to identify an equal frame with a different aspects
),
);
config.setFrames(frame)
|
PESDKConfig |
setFrames(FrameConfigInterface... frame)
Set frames
ArrayList<AbstractConfig.AspectConfigInterface> cropConfig = new ArrayListArrayList<>();
cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1));
cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3));
config.setAspects(cropConfig);
ArrayList<FrameConfigInterface> frames = new ArrayListArrayList<>();
frames.add(new FrameConfig(
R.string.imgly_frame_name_wood,
R.drawable.imgly_frame_preview_wood,
R.drawable.imgly_frame_wood,
cropConfig.get(1)
));
config.setFrames(frame)
|
void |
setOverlays(java.util.ArrayList<OverlayConfig> overlays) |
void |
setOverlays(OverlayConfig... overlays) |
PESDKConfig |
setStickerColors(java.util.ArrayList<ColorConfigInterface> colors)
Set sticker colors @see #getTextColorConfig()
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>();
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00));
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000));
config.setBrushColors(colors);
|
PESDKConfig |
setStickerColors(ColorConfigInterface... stickerColors)
Set sticker colors @see #getTextColorConfig()
config.setBrushColors(
new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00),
new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)
);
|
PESDKConfig |
setStickerLists(java.util.ArrayList<StickerListConfigInterface> stickerLists)
Set Sticker set
ArrayList<AbstractConfig.StickerConfigInterface> stickers = new ArrayListArrayList<>();
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_normal, R.drawable.imgly_sticker_preview_glasses_normal, R.drawable.imgly_sticker_glasses_normal));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_nerd, R.drawable.imgly_sticker_preview_glasses_nerd, R.drawable.imgly_sticker_glasses_nerd));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_green, R.drawable.imgly_sticker_preview_glasses_shutter_green, R.drawable.imgly_sticker_glasses_shutter_green));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_yellow, R.drawable.imgly_sticker_preview_glasses_shutter_yellow, R.drawable.imgly_sticker_glasses_shutter_yellow));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_sun, R.drawable.imgly_sticker_preview_glasses_sun, R.drawable.imgly_sticker_glasses_sun));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_cap, R.drawable.imgly_sticker_preview_hat_cap, R.drawable.imgly_sticker_hat_cap));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_sherrif, R.drawable.imgly_sticker_preview_hat_sherrif, R.drawable.imgly_sticker_hat_sherrif));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_party, R.drawable.imgly_sticker_preview_hat_party, R.drawable.imgly_sticker_hat_party));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_zylinder, R.drawable.imgly_sticker_preview_hat_zylinder, R.drawable.imgly_sticker_hat_zylinder));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache1, R.drawable.imgly_sticker_preview_mustache1, R.drawable.imgly_sticker_mustache1));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache2, R.drawable.imgly_sticker_preview_mustache2, R.drawable.imgly_sticker_mustache2));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache3, R.drawable.imgly_sticker_preview_mustache3, R.drawable.imgly_sticker_mustache3));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache_long, R.drawable.imgly_sticker_preview_mustache_long, R.drawable.imgly_sticker_mustache_long));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_snowflake, R.drawable.imgly_sticker_preview_snowflake, R.drawable.imgly_sticker_snowflake));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_heart, R.drawable.imgly_sticker_preview_heart, R.drawable.imgly_sticker_heart));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_pipe, R.drawable.imgly_sticker_preview_pipe, R.drawable.imgly_sticker_pipe));
stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_star, R.drawable.imgly_sticker_preview_star, R.drawable.imgly_sticker_star));
config.setStickers(stickers);
|
PESDKConfig |
setStickerLists(StickerListConfigInterface... stickerLists)
Set Sticker set
config.setStickers(
new ImageStickerConfig(R.string.imgly_sticker_name_glasses_normal, R.drawable.imgly_sticker_preview_glasses_normal, R.drawable.imgly_sticker_glasses_normal),
new ImageStickerConfig(R.string.imgly_sticker_name_glasses_nerd, R.drawable.imgly_sticker_preview_glasses_nerd, R.drawable.imgly_sticker_glasses_nerd),
new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_green, R.drawable.imgly_sticker_preview_glasses_shutter_green, R.drawable.imgly_sticker_glasses_shutter_green),
new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_yellow, R.drawable.imgly_sticker_preview_glasses_shutter_yellow, R.drawable.imgly_sticker_glasses_shutter_yellow),
new ImageStickerConfig(R.string.imgly_sticker_name_glasses_sun, R.drawable.imgly_sticker_preview_glasses_sun, R.drawable.imgly_sticker_glasses_sun),
new ImageStickerConfig(R.string.imgly_sticker_name_hat_cap, R.drawable.imgly_sticker_preview_hat_cap, R.drawable.imgly_sticker_hat_cap),
new ImageStickerConfig(R.string.imgly_sticker_name_hat_sherrif, R.drawable.imgly_sticker_preview_hat_sherrif, R.drawable.imgly_sticker_hat_sherrif),
new ImageStickerConfig(R.string.imgly_sticker_name_hat_party, R.drawable.imgly_sticker_preview_hat_party, R.drawable.imgly_sticker_hat_party),
new ImageStickerConfig(R.string.imgly_sticker_name_hat_zylinder, R.drawable.imgly_sticker_preview_hat_zylinder, R.drawable.imgly_sticker_hat_zylinder),
new ImageStickerConfig(R.string.imgly_sticker_name_mustache1, R.drawable.imgly_sticker_preview_mustache1, R.drawable.imgly_sticker_mustache1),
new ImageStickerConfig(R.string.imgly_sticker_name_mustache2, R.drawable.imgly_sticker_preview_mustache2, R.drawable.imgly_sticker_mustache2),
new ImageStickerConfig(R.string.imgly_sticker_name_mustache3, R.drawable.imgly_sticker_preview_mustache3, R.drawable.imgly_sticker_mustache3),
new ImageStickerConfig(R.string.imgly_sticker_name_mustache_long, R.drawable.imgly_sticker_preview_mustache_long, R.drawable.imgly_sticker_mustache_long),
new ImageStickerConfig(R.string.imgly_sticker_name_snowflake, R.drawable.imgly_sticker_preview_snowflake, R.drawable.imgly_sticker_snowflake).
|
PESDKConfig |
setTextBackgroundColors(java.util.ArrayList<ColorConfigInterface> colors)
Set text colors
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>()
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00));
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000));
config.setTextColors(colors)
|
PESDKConfig |
setTextBackgroundColors(ColorConfigInterface... textBackgroundColors)
Set text colors
config.setTextColors(
new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00),
new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)
);
|
PESDKConfig |
setTextColors(java.util.ArrayList<ColorConfigInterface> colors)
Set text colors
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>()
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00));
colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000));
config.setTextColors(colors)
|
PESDKConfig |
setTextColors(ColorConfigInterface... textColors)
Set text colors
config.setTextColors(
new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00),
new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)
);
|
PESDKConfig |
setTools(java.util.ArrayList<ToolConfigInterface> tools)
Set Toolset
ArrayList<AbstractConfig.ToolConfigInterface> tools = new ArrayList<>()
tools.add(new CropTool(R.string.imgly_tool_name_crop, R.drawable.imgly_icon_option_crop));
tools.add(new TextTool(R.string.imgly_tool_name_text, R.drawable.imgly_icon_option_text));
tools.add(new FilterTool(R.string.imgly_tool_name_filter, R.drawable.imgly_icon_option_filters));
tools.add(new OrientationTool(R.string.imgly_tool_name_orientation, R.drawable.imgly_icon_option_orientation));
tools.add(new StickerTool(R.string.imgly_tool_name_sticker, R.drawable.imgly_icon_option_sticker));
tools.add(new ColorAdjustmentTool.Contrast(R.string.imgly_tool_name_contrast, R.drawable.imgly_icon_option_contrast));
tools.add(new ColorAdjustmentTool.Brightness(R.string.imgly_tool_name_brightness, R.drawable.imgly_icon_option_brightness));
tools.add(new ColorAdjustmentTool.Saturation(R.string.imgly_tool_name_saturation, R.drawable.imgly_icon_option_saturation));
config.setTools(tools)
|
PESDKConfig |
setTools(ToolConfigInterface... tools)
Set Toolset
config.setTools(
new CropTool(R.string.imgly_tool_name_crop, R.drawable.imgly_icon_option_crop),
new TextTool(R.string.imgly_tool_name_text, R.drawable.imgly_icon_option_text),
new FilterTool(R.string.imgly_tool_name_filter, R.drawable.imgly_icon_option_filters),
new OrientationTool(R.string.imgly_tool_name_orientation, R.drawable.imgly_icon_option_orientation),
new StickerTool(R.string.imgly_tool_name_sticker, R.drawable.imgly_icon_option_sticker),
new ColorAdjustmentTool.Contrast(R.string.imgly_tool_name_contrast, R.drawable.imgly_icon_option_contrast),
new ColorAdjustmentTool.Brightness(R.string.imgly_tool_name_brightness, R.drawable.imgly_icon_option_brightness),
new ColorAdjustmentTool.Saturation(R.string.imgly_tool_name_saturation, R.drawable.imgly_icon_option_saturation)
)
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
createSaveState, getFrozenSettings, getSettingsModel, hasRevertableState, isFrozen, isRevertible, revertState, revertState, saveInitState, saveState
addCallback, addCallback, getSettingsHandler, getStateModel, hasModelNonDefaultValue, notifyPropertyChanged, onBind, onBind, removeCallback, removeCallback
public static final android.os.Parcelable.Creator<PESDKConfig> CREATOR
public PESDKConfig()
protected PESDKConfig(android.os.Parcel in)
public int describeContents()
describeContents
in interface android.os.Parcelable
describeContents
in class Settings<ly.img.android.sdk.models.state.PESDKConfig.Event>
@NonNull public DataSourceArrayList<AspectConfigInterface> getAspects()
@Nullable public BlendModeConfig getBlendModeById(java.lang.String identifier)
public DataSourceArrayList<BlendModeConfig> getBlendModes()
@NonNull public DataSourceArrayList<ColorConfigInterface> getBrushColors()
public OrientationSensor.SCREEN_ROTATION_MODE getCameraScreenRotationMode()
@NonNull @Deprecated public DataSourceArrayList<AspectConfigInterface> getCropConfig()
public OrientationSensor.SCREEN_ROTATION_MODE getEditorScreenRotationMode()
@Nullable public ImageFilterInterface getFilterById(java.lang.String identifier)
@NonNull public DataSourceArrayList<ImageFilterInterface> getFilterConfig()
@Nullable public FontConfigInterface getFontById(java.lang.String identifier)
@NonNull public DataSourceArrayList<FontConfigInterface> getFontConfig()
@Nullable public CropAspectConfig getForceLandscapeCrop()
@Nullable public CropAspectConfig getForcePortraitCrop()
@Nullable public FrameConfigInterface getFrameById(java.lang.String identifier)
public DataSourceArrayList<FrameConfigInterface> getFrameConfig()
@Nullable public OverlayConfigInterface getOverlayById(java.lang.String identifier)
public DataSourceArrayList<OverlayConfig> getOverlays()
@Nullable public StickerConfigInterface getStickerById(java.lang.String identifier)
@NonNull public DataSourceArrayList<ColorConfigInterface> getStickerColorConfig()
@NonNull public DataSourceArrayList<StickerListConfigInterface> getStickerConfig()
@NonNull public DataSourceArrayList<ColorConfigInterface> getTextBackgroundColorConfig()
@NonNull public DataSourceArrayList<ColorConfigInterface> getTextColorConfig()
@NonNull public DataSourceArrayList<ToolConfigInterface> getTools()
public boolean hasChanges()
hasChanges
in class Settings<ly.img.android.sdk.models.state.PESDKConfig.Event>
public boolean hasNonDefaults()
hasNonDefaults
in class Settings<ly.img.android.sdk.models.state.PESDKConfig.Event>
public boolean isForceCropCaptureEnabled()
public PESDKConfig setAspects(@NonNull java.util.ArrayList<AspectConfigInterface> aspects)
ArrayList<AbstractConfig.AspectConfigInterface> cropConfig = new ArrayListArrayList<>(); cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1)); cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3f)); config.setAspects(cropConfig);
public PESDKConfig setAspects(@NonNull AspectConfigInterface... aspects)
config.setAspects( new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1), new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3f) );
public PESDKConfig setBrushColors(@NonNull java.util.ArrayList<ColorConfigInterface> colors)
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>(); colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00)); colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)); config.setBrushColors(colors);
public PESDKConfig setBrushColors(@NonNull ColorConfigInterface... brushColors)
config.setBrushColors( new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00), new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000) );
public PESDKConfig setCameraScreenRotationMode(OrientationSensor.SCREEN_ROTATION_MODE mode)
mode
- desired screen modepublic PESDKConfig setEditorScreenRotationMode(OrientationSensor.SCREEN_ROTATION_MODE mode)
mode
- desired screen modepublic PESDKConfig setFilters(@NonNull java.util.ArrayList<ImageFilterInterface> filter)
ArrayList<AbstractConfig.ImageFilterInterface> filter = new ArrayListArrayList<>() filter.add(new NoneImageFilter()); filter.add(new ColorFilterAD1920()); filter.add(new ColorFilterAncient()); filter.add(new ColorFilterBleached()); filter.add(new ColorFilterBleachedBlue()); filter.add(new ColorFilterBlues()); filter.add(new ColorFilterBlueShadows()); filter.add(new ColorFilterBreeze()); filter.add(new ColorFilterBW()); filter.add(new ColorFilterCelsius()); filter.add(new ColorFilterClassic()); filter.add(new ColorFilterColorful()); filter.add(new ColorFilterCool()); filter.add(new ColorFilterCottonCandy()); filter.add(new ColorFilterCreamy()); filter.add(new ColorFilterEighties()); filter.add(new ColorFilterElder()); filter.add(new ColorFilterEvening()); filter.add(new ColorFilterFall()); filter.add(new ColorFilterFixie()); filter.add(new ColorFilterFood()); filter.add(new ColorFilterFridge()); filter.add(new ColorFilterFront()); filter.add(new ColorFilterGlam()); filter.add(new ColorFilterHighCarb()); filter.add(new ColorFilterHighContrast()); filter.add(new ColorFilterK1()); filter.add(new ColorFilterK2()); filter.add(new ColorFilterK6()); filter.add(new ColorFilterKDynamic()); filter.add(new ColorFilterKeen()); filter.add(new ColorFilterLenin()); filter.add(new ColorFilterLitho()); filter.add(new ColorFilterLomo()); filter.add(new ColorFilterLomo100()); filter.add(new ColorFilterLucid()); filter.add(new ColorFilterMellow()); filter.add(new ColorFilterNeat()); filter.add(new ColorFilterNoGreen()); filter.add(new ColorFilterOrchid()); filter.add(new ColorFilterPale()); filter.add(new ColorFilterPola669()); filter.add(new ColorFilterPolaSx()); filter.add(new ColorFilterPro400()); filter.add(new ColorFilterQuozi()); filter.add(new ColorFilterSepiahigh()); filter.add(new ColorFilterSettled()); filter.add(new ColorFilterSeventies()); filter.add(new ColorFilterSin()); filter.add(new ColorFilterSoft()); filter.add(new ColorFilterSteel()); filter.add(new ColorFilterSummer()); filter.add(new ColorFilterSunset()); filter.add(new ColorFilterTender()); filter.add(new ColorFilterTexas()); filter.add(new ColorFilterTwilight()); filter.add(new ColorFilterWinter()); filter.add(new ColorFilterX400()); config.setFilters(filter)
public PESDKConfig setFilters(@NonNull ImageFilterInterface... filter)
config.setFilters( new NoneImageFilter(), new ColorFilterAD1920(), new ColorFilterX400() )
public PESDKConfig setFonts(@NonNull java.util.ArrayList<FontConfigInterface> fonts)
ArrayList<AbstractConfig.FontConfigInterface> fonts = new ArrayListArrayList<>(); fonts.add(new FontConfig("Geared Slab", fontAssetsFolder + "GearedSlab.ttf")); config.setFonts(fonts);
public PESDKConfig setFonts(@NonNull FontConfigInterface... fonts)
public PESDKConfig setForcedCropMode(boolean forceCropCapture, @NonNull CropAspectConfig portraitCrop, @NonNull CropAspectConfig landscapeCrop)
public PESDKConfig setFrames(@NonNull java.util.ArrayList<FrameConfigInterface> frame)
ArrayList<AbstractConfig.AspectConfigInterface> cropConfig = new ArrayListArrayList<>(); CropAspectConfig crop4_3 = new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3f); CropAspectConfig crop16_9 = new CropAspectConfig(R.string.imgly_crop_name_16_9, R.drawable.imgly_icon_crop_16_9, 16/9f); config.setAspects( new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1), crop4_3, crop16_9 ); config.setFrames( new FrameConfig( R.string.imgly_frame_name_wood, R.drawable.imgly_frame_preview_wood, R.drawable.imgly_frame_wood_4_3, crop4_3, 1 // Group-ID to identify an equal frame with a different aspects ), new FrameConfig( R.string.imgly_frame_name_wood, R.drawable.imgly_frame_preview_wood, R.drawable.imgly_frame_wood_16_9, crop16_9, 1 // Group-ID to identify an equal frame with a different aspects ), ); config.setFrames(frame)
public PESDKConfig setFrames(@NonNull FrameConfigInterface... frame)
ArrayList<AbstractConfig.AspectConfigInterface> cropConfig = new ArrayListArrayList<>(); cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_custom, R.drawable.imgly_icon_crop_custom, -1)); cropConfig.add(new CropAspectConfig(R.string.imgly_crop_name_4_3, R.drawable.imgly_icon_crop_4_3, 4/3)); config.setAspects(cropConfig); ArrayList<FrameConfigInterface> frames = new ArrayListArrayList<>(); frames.add(new FrameConfig( R.string.imgly_frame_name_wood, R.drawable.imgly_frame_preview_wood, R.drawable.imgly_frame_wood, cropConfig.get(1) )); config.setFrames(frame)
public void setOverlays(java.util.ArrayList<OverlayConfig> overlays)
public void setOverlays(OverlayConfig... overlays)
public PESDKConfig setStickerColors(@NonNull java.util.ArrayList<ColorConfigInterface> colors)
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>(); colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00)); colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)); config.setBrushColors(colors);
public PESDKConfig setStickerColors(@NonNull ColorConfigInterface... stickerColors)
config.setBrushColors( new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00), new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000) );
public PESDKConfig setStickerLists(@NonNull java.util.ArrayList<StickerListConfigInterface> stickerLists)
ArrayList<AbstractConfig.StickerConfigInterface> stickers = new ArrayListArrayList<>(); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_normal, R.drawable.imgly_sticker_preview_glasses_normal, R.drawable.imgly_sticker_glasses_normal)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_nerd, R.drawable.imgly_sticker_preview_glasses_nerd, R.drawable.imgly_sticker_glasses_nerd)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_green, R.drawable.imgly_sticker_preview_glasses_shutter_green, R.drawable.imgly_sticker_glasses_shutter_green)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_yellow, R.drawable.imgly_sticker_preview_glasses_shutter_yellow, R.drawable.imgly_sticker_glasses_shutter_yellow)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_glasses_sun, R.drawable.imgly_sticker_preview_glasses_sun, R.drawable.imgly_sticker_glasses_sun)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_cap, R.drawable.imgly_sticker_preview_hat_cap, R.drawable.imgly_sticker_hat_cap)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_sherrif, R.drawable.imgly_sticker_preview_hat_sherrif, R.drawable.imgly_sticker_hat_sherrif)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_party, R.drawable.imgly_sticker_preview_hat_party, R.drawable.imgly_sticker_hat_party)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_hat_zylinder, R.drawable.imgly_sticker_preview_hat_zylinder, R.drawable.imgly_sticker_hat_zylinder)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache1, R.drawable.imgly_sticker_preview_mustache1, R.drawable.imgly_sticker_mustache1)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache2, R.drawable.imgly_sticker_preview_mustache2, R.drawable.imgly_sticker_mustache2)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache3, R.drawable.imgly_sticker_preview_mustache3, R.drawable.imgly_sticker_mustache3)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_mustache_long, R.drawable.imgly_sticker_preview_mustache_long, R.drawable.imgly_sticker_mustache_long)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_snowflake, R.drawable.imgly_sticker_preview_snowflake, R.drawable.imgly_sticker_snowflake)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_heart, R.drawable.imgly_sticker_preview_heart, R.drawable.imgly_sticker_heart)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_pipe, R.drawable.imgly_sticker_preview_pipe, R.drawable.imgly_sticker_pipe)); stickers.add(new ImageStickerConfig(R.string.imgly_sticker_name_star, R.drawable.imgly_sticker_preview_star, R.drawable.imgly_sticker_star)); config.setStickers(stickers);
public PESDKConfig setStickerLists(@NonNull StickerListConfigInterface... stickerLists)
config.setStickers( new ImageStickerConfig(R.string.imgly_sticker_name_glasses_normal, R.drawable.imgly_sticker_preview_glasses_normal, R.drawable.imgly_sticker_glasses_normal), new ImageStickerConfig(R.string.imgly_sticker_name_glasses_nerd, R.drawable.imgly_sticker_preview_glasses_nerd, R.drawable.imgly_sticker_glasses_nerd), new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_green, R.drawable.imgly_sticker_preview_glasses_shutter_green, R.drawable.imgly_sticker_glasses_shutter_green), new ImageStickerConfig(R.string.imgly_sticker_name_glasses_shutter_yellow, R.drawable.imgly_sticker_preview_glasses_shutter_yellow, R.drawable.imgly_sticker_glasses_shutter_yellow), new ImageStickerConfig(R.string.imgly_sticker_name_glasses_sun, R.drawable.imgly_sticker_preview_glasses_sun, R.drawable.imgly_sticker_glasses_sun), new ImageStickerConfig(R.string.imgly_sticker_name_hat_cap, R.drawable.imgly_sticker_preview_hat_cap, R.drawable.imgly_sticker_hat_cap), new ImageStickerConfig(R.string.imgly_sticker_name_hat_sherrif, R.drawable.imgly_sticker_preview_hat_sherrif, R.drawable.imgly_sticker_hat_sherrif), new ImageStickerConfig(R.string.imgly_sticker_name_hat_party, R.drawable.imgly_sticker_preview_hat_party, R.drawable.imgly_sticker_hat_party), new ImageStickerConfig(R.string.imgly_sticker_name_hat_zylinder, R.drawable.imgly_sticker_preview_hat_zylinder, R.drawable.imgly_sticker_hat_zylinder), new ImageStickerConfig(R.string.imgly_sticker_name_mustache1, R.drawable.imgly_sticker_preview_mustache1, R.drawable.imgly_sticker_mustache1), new ImageStickerConfig(R.string.imgly_sticker_name_mustache2, R.drawable.imgly_sticker_preview_mustache2, R.drawable.imgly_sticker_mustache2), new ImageStickerConfig(R.string.imgly_sticker_name_mustache3, R.drawable.imgly_sticker_preview_mustache3, R.drawable.imgly_sticker_mustache3), new ImageStickerConfig(R.string.imgly_sticker_name_mustache_long, R.drawable.imgly_sticker_preview_mustache_long, R.drawable.imgly_sticker_mustache_long), new ImageStickerConfig(R.string.imgly_sticker_name_snowflake, R.drawable.imgly_sticker_preview_snowflake, R.drawable.imgly_sticker_snowflake). new ImageStickerConfig(R.string.imgly_sticker_name_heart, R.drawable.imgly_sticker_preview_heart, R.drawable.imgly_sticker_heart), new ImageStickerConfig(R.string.imgly_sticker_name_pipe, R.drawable.imgly_sticker_preview_pipe, R.drawable.imgly_sticker_pipe), new ImageStickerConfig(R.string.imgly_sticker_name_star, R.drawable.imgly_sticker_preview_star, R.drawable.imgly_sticker_star) );
public PESDKConfig setTextBackgroundColors(@NonNull java.util.ArrayList<ColorConfigInterface> colors)
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>() colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00)); colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)); config.setTextColors(colors)
public PESDKConfig setTextBackgroundColors(@NonNull ColorConfigInterface... textBackgroundColors)
config.setTextColors( new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00), new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000) );
public PESDKConfig setTextColors(@NonNull java.util.ArrayList<ColorConfigInterface> colors)
ArrayList<AbstractConfig.ColorConfigInterface> colors = new ArrayListArrayList<>() colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00)); colors.add(new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000)); config.setTextColors(colors)
public PESDKConfig setTextColors(@NonNull ColorConfigInterface... textColors)
config.setTextColors( new ColorConfig(R.string.imgly_color_accessibility_name_green, 0xFF00FF00), new ColorConfig(R.string.imgly_color_accessibility_name_red, 0xFFFF0000) );
public PESDKConfig setTools(@NonNull java.util.ArrayList<ToolConfigInterface> tools)
ArrayList<AbstractConfig.ToolConfigInterface> tools = new ArrayList<>() tools.add(new CropTool(R.string.imgly_tool_name_crop, R.drawable.imgly_icon_option_crop)); tools.add(new TextTool(R.string.imgly_tool_name_text, R.drawable.imgly_icon_option_text)); tools.add(new FilterTool(R.string.imgly_tool_name_filter, R.drawable.imgly_icon_option_filters)); tools.add(new OrientationTool(R.string.imgly_tool_name_orientation, R.drawable.imgly_icon_option_orientation)); tools.add(new StickerTool(R.string.imgly_tool_name_sticker, R.drawable.imgly_icon_option_sticker)); tools.add(new ColorAdjustmentTool.Contrast(R.string.imgly_tool_name_contrast, R.drawable.imgly_icon_option_contrast)); tools.add(new ColorAdjustmentTool.Brightness(R.string.imgly_tool_name_brightness, R.drawable.imgly_icon_option_brightness)); tools.add(new ColorAdjustmentTool.Saturation(R.string.imgly_tool_name_saturation, R.drawable.imgly_icon_option_saturation)); config.setTools(tools)
public PESDKConfig setTools(@NonNull ToolConfigInterface... tools)
config.setTools( new CropTool(R.string.imgly_tool_name_crop, R.drawable.imgly_icon_option_crop), new TextTool(R.string.imgly_tool_name_text, R.drawable.imgly_icon_option_text), new FilterTool(R.string.imgly_tool_name_filter, R.drawable.imgly_icon_option_filters), new OrientationTool(R.string.imgly_tool_name_orientation, R.drawable.imgly_icon_option_orientation), new StickerTool(R.string.imgly_tool_name_sticker, R.drawable.imgly_icon_option_sticker), new ColorAdjustmentTool.Contrast(R.string.imgly_tool_name_contrast, R.drawable.imgly_icon_option_contrast), new ColorAdjustmentTool.Brightness(R.string.imgly_tool_name_brightness, R.drawable.imgly_icon_option_brightness), new ColorAdjustmentTool.Saturation(R.string.imgly_tool_name_saturation, R.drawable.imgly_icon_option_saturation) )
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class Settings<ly.img.android.sdk.models.state.PESDKConfig.Event>