I am using Crouton lib (https://github.com/keyboardsurfer/Crouton).
now , I would like to use custom style instead of default styles. how can I do ?
Style.ALERT is a default style.
Crouton.showText(this, "test", Style.ALERT);
I want to use this style :
@styles :
<style name="CroutonGreen">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@color/color_pressed_buy_an_item</item>
<item name="android:gravity">center</item>
</style>
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:
}
I haven't test it, but i think it should work.
Then below on that class there is the following code:
heightInPixels, widthInPixels, gravity are already set correctly according to your style.
Finally, in your app, call your crouton with Style.CUSTOM.