Tuesday, 15 April 2014

android - Application label font not preserved on orientation change -



android - Application label font not preserved on orientation change -

i not able preserve font application label on screen orientation change. setting font using below code in oncreate method of sherlockfragmentactivity.

titleid = resources.getsystem().getidentifier("action_bar_title", "id", "android"); if(titleid == 0) titleid = com.actionbarsherlock.r.id.abs__action_bar_title; mappname = (textview) findviewbyid(titleid); typeface face = typeface.createfromasset(getassets(), "fonts/handsean.ttf"); mappname.settypeface(face);

on orientation alter font reverts default. tried preserving state using manifest.xml didnot help. preserves except label font. can suggest how can done ?

thanks stopping , reading post.

did tried setting android:configchanges="orientation" , handling orientation alter onconfigurationchanged()?

edit: explained here why it's not functioning.

android android-actionbar actionbarsherlock

No comments:

Post a Comment