stepstone-tech / android-material-stepper

This library allows to use Material steppers inside Android applications.
Apache License 2.0
1.78k stars 261 forks source link

Tab - inactive tab color #207

Closed nibo closed 7 years ago

nibo commented 7 years ago

Hi... I'd like to use a color with transparency as inactive color for the tabs. I haven't found a solution by myself - is this possible?

zawadz88 commented 7 years ago

Hi @nibo, This should be theoretically possible by specifying an alpha in the color, e.g.

app:ms_inactiveStepColor="#33ff0000"

however I see that there's some issue where a black background is visible underneath.

I'll investigate and get back to you.

nibo commented 7 years ago

Thank's for reply...

i think the problem is: mStepIconBackground.setColorFilter(mUnselectedColor); where the imageview user default : PorterDuff.Mode.SRC_ATOP

maybe a solution is to enable the "alpha" as value or change the method to "backgroundRessource"for the step background

zawadz88 commented 7 years ago

Thanks for the hint. After changing mStepIconBackground.setColorFilter(mUnselectedColor) to mStepIconBackground.setColorFilter(mUnselectedColor, PorterDuff.Mode.SRC_IN) it seems to be fixed! I'll submit a PR shortly.

nibo commented 7 years ago

Thats awesome - thank you!

zawadz88 commented 7 years ago

Fixed, this will be in 4.3.0. Thanks for reporting this.