State Based fontFamily in Android

58 Views Asked by At

StateListDrawables and are great for setting different drawables for each state of a view, but is there a way to tie in what text style that view should use for each of those states?

For example, if you had a button that was fontFamily of "sans-serif-medium", and when focused, the button fontFamily became "sans-serif-light". I can imagine how I would do this with code, but is there a way to do it with XML similar to the used for drawables?

0

There are 0 best solutions below