2014-11-22 23 views
1

我想表明我自己的自定义字体“的.ttf”在我的整个应用程序中设置自定义字体在整个应用程序如何在Android的

请注意... 我并不只需要改变,“文本查看“,”编辑文本“和”按钮“文字字体创建字体

+0

这是可以做到纯文本浏览和编辑文本 – 2014-11-22 07:53:29

+0

http://stackoverflow.com/questions/2973270/using-a-custom-typeface-in-android/16275257#16275257 – MilapTank 2014-11-22 08:01:59

+0

@andruboy第二个链接是造型。这是否允许在资产文件夹中选择“'customfont.ttf'”? :) – 2014-11-22 08:03:45

回答

2

唯一的出路是扩展Android UI小部件并创建自定义视图。但这是一个乏味的过程。相反,你可以使用Calligraphy Project

书法
自定义字体在Android的最简单的方式。

你是否厌倦了自定义视图来设置字体?或者遍历 ViewTree来查找TextViews?我也是。

您可以参考这些答案更多
Android - Using Custom Font

以下链接已经采取了从评论:
Using a custom typeface in Android
How to set default font family for entire Android app

0

你可以声明自定义字体样式在应用程序标签下的manifest.xml文件中。 例如: -

<application 
      android:name="com.digimedia.icouch.bean.AppContext" 
      android:icon="@drawable/app_logo" 
      android:label="@string/app_name" 
      android:theme="@style/CustomActionBarTheme" >