JoelB
JoelB

Reputation: 411

React native android text has extra bottom padding

I am trying to align my two text components to the baseline of the first and I can't seem to get it working on android. I know that android deals with calculating the top and bottom spacing of the font and I tried using includeFontPadding: false, which works but only for the top. The bottom padding remains. Can anyone please help? Here's a snack showing my issue: https://snack.expo.io/S1ZAgflum

Edited: I modified the snack to remove the lineHeight and includeFontPadding properties to show the problem I'm having more clearly.

Below is a direct comparison from the snack and I've added a red line to show the difference in the number's height.

enter image description here

Upvotes: 2

Views: 4750

Answers (1)

Astolfo Hoscher
Astolfo Hoscher

Reputation: 262

I' don't know if is too late, but I solved this setting the height of the text element with the same value of the fontSize.

Upvotes: 2

Related Questions