replacing global font in an application - classloading against Dalvik?

1 view
Skip to first unread message

Carl H.

unread,
Jun 3, 2010, 7:06:02 AM6/3/10
to LondOnAndroid
Hello All,

I am trying to replace the default font against my application. This
is a requirement which I can't escape. I have been able to set the
font via setTypeFace (http://www.barebonescoder.com/2010/05/android-
development-using-custom-fonts/). It works great but I have tons of
TextView and it would be tedious to programmatically get all TextViews
and setting the type face manually.

Now as many developers, I believe in Lazyness and would like a clever
solution for this. What I though would be interesting is replacing the
classloader and hook the TextView loading in order to set the typeface
at that moment. I am having trouble setting the classloader for my
application. Anybody in the group had the ability to do anything
similar? any comments?

Cheers,
Carl
Reply all
Reply to author
Forward
0 new messages