michaelmuenzer/ScrollableNumberPicker

Question

Closed this issue · 1 comments

Hi! I use create the component via Java and I need to change the color of the arrows and the text appearance (app:snp_value_text_appearance)

How can I do that ?

Thanks!

Hello benoffi7,
you can change the color of the arrow by using a colored drawable with the xml-attribute app:snp_buttonIconLeft. An example is the arrow_up_bold_circle_outline.xml where you could change the android:fillColor to achieve that.

Changing the text-appearance is working the same way. You just need to pass a style which matches your requirements. E.g.

Insert a new style in styles.xml
<style name="CustomTextAppearance" parent="@android:style/TextAppearance"> <item name="android:textColor">#FF1234</item> <item name="android:textSize">14dp</item> </style>

And add it like:
app:snp_value_text_appearance="@style/CustomTextAppearance"

For changing only the text color you can use app:snp_value_text_color as well. Note that it overwrites the color defined in text-appearance.