SyntaxHighlighter JS

2013-01-22

android:layout_width

Android UI XML Attribute

Name
android:layout_width

Description
Controls the width 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_width="wrap_content" />

Reference
Android API: layout_width

No comments:

Post a Comment