Hi all
I want to switch font in my application, and I of course want to use
the same font in every text element. The only way I've found out how
to do it is to pull out each textview/button/edittext/... in java and
do:
TextView txt = (TextView) findViewById(R.id.custom_font);
Typeface font = Typeface.createFromAsset(getAssets(), "myfont.ttf");
txt.setTypeface(font);
It makes the xml pretty much useless since I have to programaticly
change almost every view anyways. Is there a way to set the default
font in a style.xml or similar? Haven't been able to figure out how to
do it in xml.
Thanks
Jon
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en