I'd like to add letter spacing on my collapsingToolbar's title by adding android:letterSpacing=20 in:
<style name="CollapsedAppBar" parent="@android:style/TextAppearance">
<item name="android:letterSpacing">20</item>
<item name="android:textSize">90sp</item>
</style>
I'm calling my styles.xml from my activity class:
collapsingToolbar.setCollapsedTitleTextAppearance(R.style.CollapsedAppBar);
However, the textSize works but the letterSpacing attribute doesn't work, anyone can you help me about this?
It looks like it does not support letter spacing :( CollapsingToolbarLayout delegates to CollapsingTextHelper which does not look for the android:letterSpacing attribute when parsing the TextAppearance:
https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/design/src/android/support/design/widget/CollapsingTextHelper.java#197
Please can you file a bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With