XML中的那些属性


android:scaleType
Since: API Level

Controls how the image should be resized or moved to match the size of this ImageView.

Must be one of the following constant values.
Constant	Value	Description
matrix	0	
fitXY	1	
fitStart	2	
fitCenter	3	
fitEnd	4	
center	5	
centerCrop	6	
centerInside	7	

This corresponds to the global attribute resource symbol scaleType.
Related Methods

    * setScaleType(ImageView.ScaleType)





android.weget
http://androidappdocs.appspot.com/reference/android/widget/ImageView.html#setMaxHeight%28int%29
public void  setMaxHeight  (int maxHeight)
Since: API Level 1

An optional argument to supply a maximum height for this view. Only valid if setAdjustViewBounds(boolean) has been set to true. To set an image to be a maximum of 100 x 100 while preserving the original aspect ratio, do the following: 1) set adjustViewBounds to true 2) set maxWidth and maxHeight to 100 3) set the height and width layout params to WRAP_CONTENT.

Note that this view could be still smaller than 100 x 100 using this approach if the original image is small. To set an image to a fixed size, specify that size in the layout params and then use setScaleType(ImageView.ScaleType) to determine how to fit the image within the bounds.
Related XML Attributes

    * android:maxHeight

Parameters
maxHeight 	maximum height for this view



距上一个布局的间隔距
android:layout_marginTop


你可能感兴趣的:(html,android,xml)