16

Is there anyway to make Android text in the xml file both bold and italics?

SAMPLE

Swayam
  • 16,294
  • 14
  • 64
  • 102
Jeremy
  • 3,620
  • 9
  • 43
  • 75

4 Answers4

49

Yes, just add android:textStyle="bold|italic".

Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
  • 1
    I believe you can just use textStyle="bolditalic" – Shivan Dragon Aug 29 '12 at 18:04
  • It's referenced [here](http://developer.android.com/reference/android/widget/TextView.html#attr_android:textStyle), but not listed in the table, but I believe you're correct. Either way should work. :) – Kevin Coppock Aug 29 '12 at 18:06
3

have you tried this

android:textStyle="italic|bold"
MAC
  • 15,799
  • 8
  • 54
  • 95
1

try this:

<Textview android:textStyle="bolditalic" ....

for more info see http://developer.android.com/reference/android/widget/TextView.html#attr_android:textStyle

ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213
0
<TextView
    android:id="@+id/mTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textStyle="bold|italic"
    android:text="YOUR_TEXT"
/>
Massimo
  • 3,436
  • 4
  • 40
  • 68
Swayam
  • 16,294
  • 14
  • 64
  • 102