Height width in percentage? DIP?


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.

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

Thanks as always!



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?


It is mentioned here, in the API doc.

Thanks for clarifying!



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