Muhammad Umar
Muhammad Umar

Reputation: 11782

Effect of Sp and dp on layout dimension android

I have a very simple question to ask

I have a relativeLayout with its width set to 100dp. Now whatever the screen will be, xhdpi, lpdi, hdpi etc it will remain 100dp. However if i change the width to 100Sp what will be the difference?

Upvotes: 3

Views: 151

Answers (1)

Warpzit
Warpzit

Reputation: 28152

Nothing will change and yet everything because sp and dp is the same for normal phone configurations but if the user increase text size sp will scale larger or smaller, while dp will remain the same.

See more here.

Upvotes: 3

Related Questions