It says here:
In general you can modify
display duration
dimension settings
options for the text to display
custom Views
appearance & disappearance Animation
displayed Image
Since Style is the general entry point for tweaking Croutons, go and see for yourself what can be done with it.
You can try modifying that class with the following code to change background color:
static {
ALERT = new Builder()
.setBackgroundColorValue(holoRedLight)
.build();
CONFIRM = new Builder()
.setBackgroundColorValue(holoGreenLight)
.build();
INFO = new Builder()
.setBackgroundColorValue(holoBlueLight)
.build();
CUSTOM = new Builder()
.setBackgroundColorValue(myColor)
.build();
}
I haven't test it, but i think it should work.
Then below on that class there is the following code:
public Builder() {
configuration = Configuration.DEFAULT;
paddingInPixels = 10;
backgroundColorResourceId = android.R.color.holo_blue_light;
backgroundDrawableResourceId = 0;
backgroundColorValue = NOT_SET;
isTileEnabled = false;
textColorResourceId = android.R.color.white;
textColorValue = NOT_SET;
heightInPixels = LayoutParams.WRAP_CONTENT;
widthInPixels = LayoutParams.MATCH_PARENT;
gravity = Gravity.CENTER;
imageDrawable = null;
imageResId = 0;
imageScaleType = ImageView.ScaleType.FIT_XY;
fontName = null;
fontNameResId = 0;
}
heightInPixels, widthInPixels, gravity are already set correctly according to your style.
Finally, in your app, call your crouton with Style.CUSTOM.
Crouton.showText(this, "test", Style.CUSTOM);