Android7.0中文API --- ImageView

来源:互联网 发布:工程网络计划紧前工作 编辑:程序博客网 时间:2024/06/04 17:47

完整内容请查看http://www.zhdoc.net/android/reference/android/widget/ImageView.html

ImageView

public class ImageView
extends View

java.lang.Object   ↳android.view.View    ↳android.widget.ImageView
已知的直接子类
已知的间接子类


Displays an arbitrary image, such as an icon. The ImageView class can load images from various sources (such as resources or content providers), takes care of computing its measurement from the image so that it can be used in any layout manager, and provides various display options such as scaling and tinting.
显示一个任意的图片,如一个图标。ImageView类可以从不同的源载入图片(如资源或content provider),并负责计算从图像中得到的尺寸,这样它就可以在任何布局管理器中使用,并提供各种显示选项,例如缩放和着色。

摘要


嵌套类

enumImageView.ScaleType

Options for scaling the bounds of an image to the bounds of this view. 
将图像边界缩放到该视图边界的选项。 

XML属性

android:adjustViewBounds如果希望ImageView调整其边界,并保持其drawable长宽比,则设置为Ture。 android:baseline此视图中基线的偏移量。 android:baselineAlignBottom如果为true, 则image view将根据其底部边缘做基线对齐。 android:cropToPadding如果为true,图片将裁剪以符合其内边距(padding)。 android:maxHeight可选参数,为此视图的最大高度。 android:maxWidth可选参数,为此视图的最大宽度。 android:scaleType控制图像的大小或移动方式以匹配此ImageView的大小。 android:srcImageView的内容所代表的drawable。 android:tint图像的tint颜色。 android:tintMode混合模式,用于图像着色。 

继承XML属性


完整内容请查看http://www.zhdoc.net/android/reference/android/widget/ImageView.html

原创粉丝点击