Add ImageOption
@@ -84,6 +84,8 @@ public class ImageOptions extends DecodedImageOptions {
private final int mDelayMs;
+ private final boolean mExperimentalDynamicSize;
+
public ImageOptions(Builder builder) {
super(builder);
mPlaceholderRes = builder.mPlaceholderRes;
@@ -118,6 +120,8 @@ public class ImageOptions extends DecodedImageOptions {
mCustomDrawableFactory = builder.mCustomDrawableFactory;
mDelayMs = builder.mDelayMs;
+
+ mExperimentalDynamicSize = builder.mExperimentalDynamicSize;
}
public Builder extend() {
@@ -216,6 +220,10 @@ public class ImageOptions extends DecodedImageOptions {
return mDelayMs;
}
+ public boolean getExperimentalDynamicSize() {
+ return mExperimentalDynamicSize;
+ }
+
public boolean equalsForActualImage(ImageOptions other) {
if (this == other) {
return true;
@@ -401,6 +409,8 @@ public class ImageOptions extends DecodedImageOptions {
private int mDelayMs;
+ private boolean mExperimentalDynamicSize;
+
private Builder() {
super();
}
@@ -435,6 +445,8 @@ public class ImageOptions extends DecodedImageOptions {
mCustomDrawableFactory = defaultOptions.getCustomDrawableFactory();
mDelayMs = defaultOptions.getDelayMs();
+
+ mExperimentalDynamicSize = defaultOptions.getExperimentalDynamicSize();
}
public Builder placeholder(@Nullable Drawable placeholder) {
@@ -620,6 +632,11 @@ public class ImageOptions extends DecodedImageOptions {
return getThis();
}
+ public Builder experimentalDynamicSize(boolean dynamicSize) {
+ mExperimentalDynamicSize = dynamicSize;
+ return getThis();
+ }
+
@Override
public final ImageOptions build() {
return new ImageOptions(this);
