4

I don't why but my application doesn't show the TextView in italic on the Samsung Galaxy Tab 2 (while it is working correctly on a Nexus 7 tablet for instance).

My code :

<style name="MyTheme.GeneralRedDate">
    <item name="android:textColor">@color/red</item>
    <item name="android:textSize">15sp</item>
    <item name="android:textStyle">bold|italic</item>
</style>

Of course I already tried to put italic instead of bold|italic and it doesn't work neither.

EDIT It seems that this thread is the same : Samsung devices supporting setTypeface(Typeface.Italic)?

Community
  • 1
  • 1
thomaus
  • 6,170
  • 8
  • 45
  • 63
  • What happens if you take a simple TextView and set the `textStyle` to `bold|italic` directly from the layout? – Paul Lammertsma Feb 01 '13 at 23:25
  • I just tried and it doesn't work neither. – thomaus Feb 04 '13 at 10:40
  • This sounds very odd to me; it would suggest that Samsung for some reason modified Android's TextView class to override or ignore `textStyle`. This would be evident in many applications and I haven't seen this on my own Galaxy Tab 2 7" before. I would suggest making a minimum working example to make sure there isn't just something wrong with your style declaration. (Perhaps you're targeting a different device class?) – Paul Lammertsma Feb 04 '13 at 14:16

1 Answers1

5

This is a bug from Samsung and the best solution is, as FomayGuy said, to add the italic version of the system font to the assets.

The official Roboto Android font is available here.

thomaus
  • 6,170
  • 8
  • 45
  • 63