Android Change Font Type Of Application?
I need font typeface Helvetica in my application and works for all activities.there are any source for that? i have Helvetica.ttf file in assets folder but when i try TextView
Solution 1:
Define font style in resources and use where ever you are creating your elements. Like this:
<stylename="CodeFont"parent="@android:style/TextAppearance.Medium"><itemname="android:layout_width">fill_parent</item><itemname="android:layout_height">wrap_content</item><itemname="android:textColor">#00FF00</item><itemname="android:typeface">monospace</item></style>
You may refer to these links as well:
http://developer.android.com/guide/topics/ui/themes.html
http://www.androidengineer.com/2010/06/using-themes-in-android-applications.html
If you want to use custom font then have a look at this :
http://www.barebonescoder.com/2010/05/android-development-using-custom-fonts/
Solution 2:
I need font typeface Helvetica in my application
I hope you have properly licensed this for distribution, as Helvetica appears to be a commercial font.
and works for all activities
By you manually bundling the font in your app and by manually applying it to each and every TextView
(or subclass), yes.
Post a Comment for "Android Change Font Type Of Application?"