text ——设定字体
来源:互联网 发布:jsp点击按钮不执行js 编辑:程序博客网 时间:2024/04/29 15:48
转自http://blog.csdn.net/wonderful19891024/article/details/6033304
在xml中设定
<!-- 使用默认的sans字体--> <TextView android:id="@+id/sans" android:text="Hello,World" android:typeface="sans" android:textSize="20sp"> </TextView> <!-- 使用默认的serifs字体--> <TextView android:id="@+id/serif" android:text="Hello,World" android:typeface="serif" android:textSize="20sp"> </TextView> <!-- 使用默认的monospace字体--> <TextView android:id="@+id/monospace" android:text="Hello,World" android:typeface="monospace" android:textSize="20sp"> </TextView>
//得到TextView控件对象 TextView textView = (TextView)findViewById(R.id.custom); //将字体文件保存在assets/fonts/目录下,创建Typeface对象 Typeface typeFace = Typeface.createFromAsset(getAssets(), "fonts/HandmadeTypewriter.ttf"); //应用字体 textView.setTypeface(typeFace);
0 0
- text ——设定字体
- text——默认系统字体
- text——设置字体风格
- text——Android字体工作原理
- Dreamweaver中如何设定文字——大小、字体、颜色
- Text Kit框架高级应用——特殊字体
- text——android.graphic.typeface字体类
- text——替换Android默认的汉字字体
- text——Android下的默认字体详解
- CSS字体的详细设定
- CSS字体的详细设定
- RTF 字体颜色表 设定
- [PPT] 设定PPT默认字体
- 设定printf输出字体颜色
- Text Kit框架——动态字体及cell动态高度
- text——在xml文件中控制字体颜色随着按钮状态改变
- text——为android系统添加一种默认字体,类似“sans”,“serif”,“monospace”
- 修改text字体属性
- UITableView default separator color
- Android性能优化——常见的内存泄漏及处理方法
- VF01开票BAPI
- ios的截图功能
- 滚动字幕
- text ——设定字体
- 连接到本地服务器的方法
- java.lang.NoClassDefFoundError
- unity烘焙后阴影怎么没了
- redis性能调优总结
- 【BeanUtils】自己写的一个BeanUtils-代码方法详解
- View的工作原理
- error code 1146 > Error 'Table 'tts.t2' doesn't exist' on query. Default database: 'test'. Query: 'i
- 【C#MVC】 使用HttpWebRequest访问外部API,并返回json信息 (Access_Key)