TextView without adding by default when increasing the size of textView

I want to remove the default mark for textView. when I increase the size of the textView, then the fill size increases automatically. even I set the background of the View text as "@null". I just want to show only the text without any additions. my view looks like the first image, and I want to show as the second image.

first image

second image

+2
source share
2 answers

Maybe this will help you

<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="0dip" android:layout_margin="0dip" android:background="@android:color/transparent" /> 

Edit: Try two attributes:

  android:maxWidth="...dip" android:maxHeight="...dip" 
+1
source

Try android: includeFontPadding = "false" or set the height just like the size of the text, not "wrap_content"

+1
source

All Articles