Android: TextView: Remove spacing and padding on top and bottom
I searched a lot for proper answer but no where I could find an Answer which could exactly remove all the padding from the TextView
, but finally after going through the official doc got a work around for Single Line Texts
android:includeFontPadding="false"android:lineSpacingExtra="0dp"
Adding these two lines to TextView
xml will do the work.
First attribute removes the padding reserved for accents and second attribute removes the spacing reserved to maintain proper space between two lines of text.
Make sure not to add
lineSpacingExtra="0dp"
in multiline TextView as it might make the appearance clumsy