0

In theory, if I consider the smallest resolution possible for an android device (the one with 160 pixel of height), I can program an application that will scale perfectly on every device with bigger resolutions by specifying the dimensions of every view with dp instead of pixels.

But how can I use also perfectly scalable text with sp?

If I specify a text of 50 sp, it will appear very big on a small screen and small on bigger ones.

Is there any suggested way?

Kami
  • 1,079
  • 2
  • 13
  • 28
  • `sp` means "scaled pixels", and the idea with `sp` and `dp` is to keep the text or view the same size regardless of screen *resolution*, not screen *size*. a rectangle 40x40dp in size should be 1/4" on all devices, regardless of screen size or resolution. – 323go Aug 08 '13 at 17:12
  • Ok, but how can I scale my layout to fill the screen on every device? It is true that sp and dp mantains the same proportion on every resolution, but they do not help to maintain the visible part the same. A lot of text views with big sp may go out on some devices. – Kami Aug 08 '13 at 17:27

0 Answers0