pakerfeldt / android-viewflow

A horizontal view scroller library for Android
1.78k stars 694 forks source link

Setting font of Titles in TitleFlowIndicator #51

Closed SeanPONeil closed 13 years ago

SeanPONeil commented 13 years ago

Is there a way to use a custom font for the titles in the TitleFlowIndicator?

pakerfeldt commented 13 years ago

Not at the moment. Are you talking about custom fonts as in fonts you provide with your application or as those provided by the system?

pakerfeldt commented 13 years ago

Nevermind, I implemented both in https://github.com/pakerfeldt/android-viewflow/commit/6befb6b80447774ec8a9dcb90a2b38b02c4919c0

Either use android:typeface (and optionally android:textStyle) or if you provide your own font use app:customTypeface. Set it to the path of your font relative assets, e.g. fonts/Antic.ttf. See viewflow-example.

SeanPONeil commented 13 years ago

I was going to do a pull request tonight for this, but this is cool too! Thank you

pakerfeldt commented 13 years ago

Did you solve it in a similar fashion?

SeanPONeil commented 13 years ago

I had only implemented the android:typeface feature, but it was nearly exactly what you had committed

pakerfeldt commented 13 years ago

okay, cool.