markormesher / android-fab

Floating action button (FAB) for Android with speed-dial menu functionality
Apache License 2.0
211 stars 29 forks source link

How to change color of option's text #55

Closed theshid closed 4 years ago

theshid commented 4 years ago

Hi I'm trying to change the color of the options s text but I didn't see a way to do it

markormesher commented 4 years ago

Hi @theshid. That's not possible at the moment unfortunately, but that sounds like it would be a useful addition. I don't know when I'll have time to take a look at adding it, but if you want to PR the addition I'd be happy to work with you on it. My first thought is creating a decorator class that is passed each element of the FAB and speed-dial menu to make changes before it is rendered, but there might be better options too.

theshid commented 4 years ago

Actually it is possible, I just didn't read all your code that's why I didn't see it or maybe we misunderstood each other. I was talking about the label next to the menu items. I found out that you could do it easily in the function onPrepareItemLabel since we can access the Textview that displays the label. I also made a PR in which I added the possibility to chose the color of the menu items background since there was only one colour by default.

markormesher commented 4 years ago

Aha, you're absolutely right. That's exactly what I was describing when I said

a decorator class that is passed each element of the FAB and speed-dial menu to make changes before it is rendered

but I didn't realise that it was already implemented! Can you tell I've not worked on this library much lately? I'm going to file an issue to include those methods in the documentation, but other than that I think this issue is all sorted?