如何将字体样式设置为粗体,斜体和下划线在Android的TextView?斜体、下划线、设置为、如何将

由网友(你的唇、我还在回味)分享简介:我想打一个的TextView 的内容粗体,斜体和下划线。我尝试以下code和它的工作原理,但并不突出。I want to make a TextView's content bold, italic and underlined. I tried the following code and it works, bu...

我想打一个的TextView 的内容粗体,斜体和下划线。我尝试以下code和它的工作原理,但并不突出。

I want to make a TextView's content bold, italic and underlined. I tried the following code and it works, but doesn't underline.

<Textview android:textStyle="bold|italic" ..

我该怎么办呢?任何快的想法?

How do I do it? Any quick ideas?

推荐答案

我不知道下划线,但对于粗体和斜体有BOLDITALIC。没有提到下划线这里的:http://developer.android.com/reference/android/widget/TextView.html#attr_android:textStyle

I don't know about underline, but for bold and italic there is "bolditalic". There is no mention of underline here: http://developer.android.com/reference/android/widget/TextView.html#attr_android:textStyle

提个醒,要使用提到 BOLDITALIC 你需要,我从该页面引用

Mind you that to use the mentioned bolditalic you need to, and I quote from that page

必须是一个或多个(由分隔'|')。以下常量值

Must be one or more (separated by '|') of the following constant values.

所以你会使用粗体|斜体

您可以检查这个问题的底线:我可以在下划线的文本一个Android布局?

You could check this question for underline: Can I underline text in an android layout?

阅读全文

相关推荐

最新文章