Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Layout Width/Height Constants
public static final int FILL_PARENT
Added in API level 1
Special value for the height or width requested by a View. FILL_PARENT means that the view wants to be as big as its parent, minus the parent's padding, if any. This value is deprecated starting in API Level 8 and replaced by MATCH_PARENT.
Constant Value: -1 (0xffffffff)
public static final int MATCH_PARENT
Added in API level 8
Special value for the height or width requested by a View. MATCH_PARENT means that the view wants to be as big as its parent, minus the parent's padding, if any. Introduced in API Level 8.
Constant Value: -1 (0xffffffff)
public static final int WRAP_CONTENT
Added in API level 1
Special value for the height or width requested by a View. WRAP_CONTENT means that the view wants to be just large enough to fit its own internal content, taking its own padding into account.
Constant Value: -2 (0xfffffffe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment