0

I have been reading it is recommended to indicate EditText or TextView textSize attribute in sp. The thing is that my requirements indicate me 40px, but nothing regarding sp.

So, how can I convert these px in order to set sp into my layout?

markalex
  • 8,623
  • 2
  • 7
  • 32
mantc_sdr
  • 451
  • 3
  • 17
  • it is already answered here: https://stackoverflow.com/questions/29664993/how-to-convert-dp-px-sp-among-each-other-especially-dp-and-sp – nidhi Apr 28 '21 at 08:57
  • But I'd like to know it not at runtime time, because I want to set it in the styles/theme sheet – mantc_sdr Apr 28 '21 at 09:02

0 Answers0