2013年7月31日星期三

android layout and the layout of the property

 

set EditText is empty input box prompt information.

 

android: gravity
android: gravity attribute is limited to the contents of this view. For example, a button above the text. You can set the text in the view of the left, right, and other locations. In button example, android: gravity = "right" button above text is right

 

android: layout_gravity
android: layout_gravity is used to set up the view relative to the location of the parent view. For example, a button in linearlayout where you want the button on the left, right, and other locations can be set through this property. In button example, android: layout_gravity = "right" then button right

android: layout_alignParentRight

to make the right and the parent of the current control control is aligned to the right. This property value can only be true or false, default false.

 

android: scaleType:
android: scaleType is to control how the image resized / moved to the horses on the ImageView size. ImageView.ScaleType / android: scaleType meaning of the value difference:

 

CENTER / center at the original size picture centered, when the image length / width exceeding View the length / width, then the middle part of the picture shows the interception

 

CENTER_CROP / centerCrop scaled image size centered, makes the picture length (W) equal to or greater than the length of View (W)

 

CENTER_INSIDE / centerInside complete contents of the picture centered by a scaled-down size makes the picture or the original length / width equal to or less than the View's length / width

 

FIT_CENTER / fitCenter the picture proportionally expansion / reduction to View the width, centered

 

FIT_END / fitEnd the picture proportionally expansion / reduction to View the width of the lower part of the display in the View location

 

FIT_START / fitStart the picture proportionally expansion / reduction to View the width of the upper part of the display in the View location

 

FIT_XY / fitXY the picture? disproportionate expansion / reduction of the size of the display to the View

 

MATRIX / matrix matrix to draw dynamically shrink enlarged images to display.

 

** to note that, Drawable folder inside the picture naming is not capitalized.

没有评论:

发表评论