Skip to content

Instantly share code, notes, and snippets.

@chris-piekarski
Created October 7, 2014 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-piekarski/8b2c4a099c95c47d3e3b to your computer and use it in GitHub Desktop.
Save chris-piekarski/8b2c4a099c95c47d3e3b to your computer and use it in GitHub Desktop.
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