Hello, What is the difference between `size` `ide...
# doodle
c
Hello, What is the difference between
size
idealSize
minimumSize
. Like what role do they play and how do they affect each other?
n
hey @Cherrio LLC.
size
is the View’s display size. it will tell you how much space the View takes on the screen. setting it will change how the View is displayed. it will also trigger a layout if the View’s parent has a
Layout
.
idealSize
is a hint you can set for a View that indicates the size it prefers to have. setting this doesn’t change the View’s display directly. instead, it hints to any Layouts (or other code) how they might want to update that View’s
size
. Layouts that rely on it (and/minimumSize) will need to explicitly indicate this to get notified when this value changes for a View under their control.
minimumSize
is like
idealSize
except it is a hint about the smallest size a View would like to have. the idea is sizes below that might make the View look strange.
🙌 1
c
This explains a lot
Thanks