android - Why is my title using a custom font not vertically centered in my ActionBar? -
in attempting modify font of actionbar
title located answer suggested adjusting typeface
via spannablestring
. while works noted in answer, placement seems deviate being vertically centered.
i have tried 2 different fonts, both opentype (roundhand) , truetype (billabong). in addition have tried on older gingerbread device (where screenshot from) running 2.3.3 via newer jelly bean device running 4.2. project makes use of actionbarsherlock , last theoretical culprit. have adjusted font size in hopes of centering know nothing more hack , not solving ultimate problem @ hand.
with that, why title not centered appropriately , how can correct it? if there way adjust alignment per implemented solution referenced above suffice, if actionbarsherlock culprit. knowing culprit , why occurring part of answer, not providing workaround.
update:
screenshot below making use of show layout bounds. please note in order make use of show layout bounds device running jelly bean whereas previous screenshot gingerbread device. in either case, problem same.
update:
if use typeface.default
when call setspan
bounds , alignment appear should.
update:
upon trying third font, appears issue in fact tied fonts.
this going sound stupid i've spent 1 hour figuring out had subtitle underneath title set color of action bar background invisible.
maybe someone, somewhere :)
Comments
Post a Comment