Cherrio LLC
06/21/2024, 6:10 PMsize idealSize minimumSize . Like what role do they play and how do they affect each other?Nick
06/21/2024, 7:23 PMsize 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.Cherrio LLC
06/21/2024, 7:31 PMCherrio LLC
06/21/2024, 7:31 PM