JoshuaTree
JoshuaTree

Reputation: 1261

Android TextView's default values like height, font-size, line-spacing, padding, margin

Thanks in advance for your time.

As per the image below, I'm looking for the default values for the Android TextView but am having a difficult time locating this information.

I am aware about lineSpacingExtra and multipliers but these don't tell me what the default values.

image

Upvotes: 3

Views: 4298

Answers (2)

nidhi93
nidhi93

Reputation: 21

You can set a fix height of textview like that

android:layout_height="40dp"

OR you can set a bydefault height of textview then

  android:layout_height="wrap_content"

and some space given a layout right,left,above,below side then using android:padding="5dp"

Upvotes: 0

Sergei Bubenshchikov
Sergei Bubenshchikov

Reputation: 5371

Look at Dense layouts paragraph from material design guidlines enter image description here

Normal spacing
Height: 56dp
Padding above label: 8dp
Padding below label: 8dp
Padding below text field: 8dp
Padding above helper text: 8dp

Upvotes: 3

Related Questions