Height width in percentage? DIP?


#1

Hello all,
Whenever the height/width property applies, the doc says the unit is in percent. Percent of what? Can someone explain please.

This thread says the unit is in DIP.
https://github.com/NativeScript/docs/issues/218

I am confused. Can someone give a definite definition here, I need to keep the elements consistent.

Thanks as always!

Martin


#2

Units are dp by default, you my add px or % suffix.

Could you please point where exactly the docs says it’s percentage by default?


#3

It is mentioned here, in the API doc.

Thanks for clarifying!

Martin


#4

That is not percentage, that is a custom type PercentLength that accepts multiple units.