SyntaxHighlighter JS

2013-01-22

android:layout_height

Android UI XML Attribute

Name
android:layout_height

Description
Controls the height of the UI element.

Values
Value Description
wrap_contentUI element is automatically sized to fit the UI element content
match_parent UI element is automatically sized to fit the UI element parent container.
fill_parent Deprecated. Functionally identical as match_parent.
#dp Density-independent pixels. Actual size depends on screen resolution of device. The preferred unit to define a specific numeric UI element size. Example usage: 16dp
#sp Scale-independent pixels. Actual size depends on both screen resolution and user's font size settings. Example usage: 16sp
#pt 1/72 of an inch. Example usage: 16pt
#mm A millimeter. Example usage: 16mm
#in An inch. Example usage: 16in
#px A physical pixel. Not recommended to use. Example usage: 16px

Example Usage
<TextView android:layout_height="wrap_content" />

Reference
Android API: layout_height

No comments:

Post a Comment