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

3 comments:

  1. Your hard work truly shines through iso2god.com where useful information meets a modern and attractive design. The website is easy to explore and provides a pleasant experience for everyone. Congratulations on such an impressive achievement.

    ReplyDelete
  2. It's refreshing to discover websites like lax1dude.com that focus on quality, usability, and meaningful content. The interface is elegant, navigation is simple, and the overall presentation deserves sincere appreciation. Great effort by your team.

    ReplyDelete