
org.robolectric.shadows.ShadowGradientDrawable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import android.graphics.drawable.GradientDrawable;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
import static org.robolectric.shadow.api.Shadow.directlyOn;
@Implements(GradientDrawable.class)
public class ShadowGradientDrawable extends ShadowDrawable {
@RealObject
private GradientDrawable realGradientDrawable;
private int color;
@Implementation
public void setColor(int color) {
this.color = color;
directlyOn(realGradientDrawable, GradientDrawable.class).setColor(color);
}
public int getColor() {
return color;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy