TextView中通过XML文件中大胆? [英] TextView bold via xml file?

查看:158
本文介绍了TextView中通过XML文件中大胆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,使一个TextView勇于一个TextView的定义:

Is there a way to make a TextView be bold in a TextView definition?:

<TextView
   android:textSize="12dip"
   android:textAppearance="bold" // ?
   />

感谢

推荐答案

我有一个项目中,我有如下的的TextView

I have a project in which I have the following TextView :

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textStyle="bold"
    android:text="@string/app_name"
    android:layout_gravity="center" 
/>

所以,我猜你需要使用<一个href="http://developer.android.com/reference/android/widget/TextView.html#attr_android%3atextStyle"><$c$c>android:textStyle

这篇关于TextView中通过XML文件中大胆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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