在Android中使用的默认字体样式 [英] Using default font styles in Android

查看:431
本文介绍了在Android中使用的默认字体样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Android的默认字体大小的XML?

我想:

 安卓textAppearance =@安卓风格/ TextAppearance_Large
 

但我得到:

  

错误:错误:没有资源的发现,   匹配给定的名称(在   textAppearance,值为   。@android:风格/ TextAppearance_Large')

解决方案

是不是

 安卓textAppearance =机器人:ATTR / textAppearanceLarge
 

有一个TextView?

How do you use the Android default font sizes in xml?

I tried:

android:textAppearance="@android:style/TextAppearance_Large"

But I get:

error: Error: No resource found that matches the given name (at 'textAppearance' with value '@android:style/TextAppearance_Large').

解决方案

Isn't it

android:textAppearance="?android:attr/textAppearanceLarge"

for a TextView?

这篇关于在Android中使用的默认字体样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆