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.

screenshot of title not 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.

enter image description here

update:

if use typeface.default when call setspan bounds , alignment appear should.

enter image description here

update:

upon trying third font, appears issue in fact tied fonts.

enter image description here

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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

post - imageshack API cURL -

dataset - MPAndroidchart returning no chart Data available -